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

BoxApi20 can't obtain access_token #1045

Open
petrkopotev opened this issue Aug 4, 2022 · 0 comments
Open

BoxApi20 can't obtain access_token #1045

petrkopotev opened this issue Aug 4, 2022 · 0 comments

Comments

@petrkopotev
Copy link

According to BOX provider documentation client_id and client_secret parameters should be included in body of the request when obtaining an access token, but in current implementation they are encoded as base64 and included in Authorization header.
https://developer.box.com/reference/post-oauth2-token/

Solution is to override getClientAuthentication method in BoxApi20 class and return RequestBodyAuthenticationScheme.instance() from it.

Also BoxApi20 doesn't sign requests correctly. It should be switched to use BearerSignatureAuthorizationRequestHeaderField signature instead of using BearerSignatureURIQueryParameter. I guess for this, we just need to remove overriden getBearerSignature method from BoxApi20`.

Look at the example of API call
https://developer.box.com/reference/get-metadata-templates-enterprise-securityClassification-6VMVochwUWo-schema/

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

1 participant