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

feat: add Client Credentials Grant auth support #799

Merged
merged 3 commits into from
Feb 7, 2022
Merged

Conversation

mwwoda
Copy link
Contributor

@mwwoda mwwoda commented Feb 3, 2022

Resolves #719 and #774.

Copy link
Contributor

@antusus antusus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -160,6 +160,8 @@ public static class Constants
public const string AuthHeaderKey = "Authorization";
public const string V1AuthString = "BoxAuth api_key={0}&auth_token={1}";
public const string V2AuthString = "Bearer {0}";
public const string BearerTokenType = "bearer";
public const int AccessTokenExpirationTime = 3600; // seconds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be called ClientCredentialsAccessTokenExpirationTime ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expiration time value is tied directly to the OAuth, not to the CCG itself - JWT Auth also has the same expiration time.

@mwwoda mwwoda merged commit b8a64ca into main Feb 7, 2022
@mwwoda mwwoda deleted the sdk-1589-CCG-auth branch February 7, 2022 09:39
@mwwoda mwwoda mentioned this pull request Feb 7, 2022
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

Successfully merging this pull request may close these issues.

Add support for new Client Credentials Grant Type
2 participants