Accept oauth access token for authentication to use synapse rest services

Description

None

Environment

None

Activity

Show:
Thomas Yu
February 24, 2021, 1:36 PM

LGTM!

Jordan Kiang
February 17, 2021, 12:38 AM

that’s a good point. I've made some changes in this PR. To avoid ambiguity if both username and auth token are provided it will continue to work unless the auth token is associated with a different user, in which case it will raise an error rather log into to the token user, which might cause confusion. Logging in with the token alone is allowed, e.g.

Thomas Yu
February 6, 2021, 11:06 AM
Edited

I confirm you can actually just do:

Its a little confusing because username must be there but it can be any value, same in the command line:

Would it be a lot of work to allow users to not specify username is "authToken" is specified?

Thomas Yu
February 6, 2021, 1:15 AM

, Are you required to have the username? When using PAT via rest call, I thought you can omit the username?

Jordan Kiang
February 6, 2021, 1:10 AM
Edited

The release candidate synapse client that supports authentication with a bearer token such as a personal access token is available to validate. You can install from test pypi it e.g.

pip3 install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "synapseclient>=2.3.0"

e.g.

Doc preview here: https://jkiang13.github.io/synapsePythonClient/build/html/Credentials.html

Fixed

Assignee

Jordan Kiang

Reporter

Thomas Yu

Labels

Validator

Thomas Yu

Development Area

None

Release Version History

None

Slack Channel

None

Epic Link

Sprint

None

Fix versions

Priority

Major