Accept oauth access token for authentication to use synapse rest services
Description
Environment
Activity
LGTM!
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.
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?
, Are you required to have the username? When using PAT via rest call, I thought you can omit the username?
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