Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Make Use of ApiClient.applyAuthToRequest #304

Open
andercs opened this issue Aug 1, 2022 · 1 comment
Open

Enhancement: Make Use of ApiClient.applyAuthToRequest #304

andercs opened this issue Aug 1, 2022 · 1 comment
Assignees

Comments

@andercs
Copy link

andercs commented Aug 1, 2022

Right now, there's some pretty cool generic logic setup for applying the appropriate headers to various ApiClient requests automatically via the ApiClient.applyAuthToRequest function; however, the auth object that it tries to make use of to set the appropriate authentication header never has any fields other than type.

It would be nice if we could set the corresponding fields on an API Client, e.g. dsApiClient.setJWTToken(jwtToken), which would set the appropriate field on the corresponding auth object, so that when we make DocuSign API requests, it automatically adds the appropriate auth header.

Presently, we have to do that bit manually by doing something like dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + args.accessToken), which works, but that is an API implementation detail that could be abstracted away by the SDK.

@jglassenberg
Copy link

@andercs Thanks for sharing this recommendation. We have made a note of it to consider as we continue to update our SDKs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants