-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat: support Client Credentials Grant as authentication method #335
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think CCG should require as-user
to be set to login. I should be able to use CCG with service account.
I should be able to login as admin using subject "user". After that if I have privileges I can use as-user
header but it is not required.
Why in this solution we are not using configuration
command and allowing users to add new environment that will be using CCG? (https://github.com/box/boxcli/blob/main/docs/configure.md)
The Node SDK version that supports CCG is 2.1.0
you forgot to bump the version of the SDK in package.json
Thank you @antusus for this review! I've bumped the box-node-sdk dependency to 2.3.0. I made sure to follow https://github.com/box/box-node-sdk/blob/main/docs/authentication.md#client-credentials-grant-authentication in order to allow both enterprise and as-user authentication. You actually need to setup you default environment with |
@mhagmajer The We still are not allowing admin user to use CCG - we should allow users to put |
Something weird is going on with the tests. Doesn't seem related to this PR
I've already increased the timeout from 5s to 9s, however, it didn't help |
All req changes applied during call with @antusus. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Uses
getCCGClientForUser
method added with box/box-node-sdk#709.