docusign-esign-python-client icon indicating copy to clipboard operation
docusign-esign-python-client copied to clipboard

Fix setting the Authorization header in `set_access_token`

Open le717 opened this issue 8 months ago • 0 comments

In client.api_client, there is a method named set_access_token. This method takes an access token to set in the HTTP Authorization header that is sent to the Docusign API.

In integrating the Docusign API and using this SDK, specifically using the Authorization Code Grant authentication method, it was discovered that this method is incorrectly setting the Authorization header. It is simply setting the access token as the whole header value, rather than using the documented form of "Bearer <access_token>".

This PR patches the method to add the word Bearer, bringing the method up to specification in the documentation.

I could not find any tests to run that where this method is called, but if there are any, I'll gladly run them and fix them as needed.


Documentation showing the use of Bearer https://developers.docusign.com/platform/auth/authcode/authcode-get-token/

le717 avatar Oct 24 '23 19:10 le717