Open
Description
I have setup my oauth2 application in Bynder to authenticate using Client Credentials.
I can authenticate using postman by calling the /token endpoint.
When connecting using the python sdk, it looks like the client credential flow is not implemented correctly.
The OAuth2Session will default to a WebApplicationClient where a BackendApplicationClient would be needed for client credential authentication.
In my current workaround im fetching the token up front, but it would be nice if the sdk could handle oauth2 authentication using client credentials
client = BackendApplicationClient(client_id='<clientId>')
oauth = OAuth2Session(client=client)
token = oauth.fetch_token(token_url='<tokenurl>', client_id='<clientId>',client_secret='<clientSecret>')
bynder_client = BynderClient(
domain='<bynderDomain>',
redirect_uri='', #required but should not be used
token = token, #input the token to avoid the bynder client trying to fetch
client_id='<clientId>', #Not used since the token is supplied
client_secret='<clientSecret>',#Not used since the token is supplied
scopes=['<scope>','<scope>']
)
Metadata
Assignees
Labels
No labels
Activity