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 support for Client Credentials Grant authentication method #705

Merged
merged 4 commits into from Feb 25, 2022

Conversation

lukaszsocha2
Copy link
Contributor

Closes: SDK-1574

@coveralls
Copy link

coveralls commented Feb 24, 2022

Pull Request Test Coverage Report for Build 1898345589

  • 96 of 105 (91.43%) changed or added relevant lines in 4 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 93.57%

Changes Missing Coverage Covered Lines Changed/Added Lines %
boxsdk/auth/redis_managed_jwt_auth.py 0 1 0.0%
boxsdk/auth/jwt_auth.py 4 6 66.67%
boxsdk/auth/server_auth.py 84 90 93.33%
Files with Coverage Reduction New Missed Lines %
boxsdk/auth/redis_managed_jwt_auth.py 3 33.33%
Totals Coverage Status
Change from base Build 1864243312: -0.02%
Covered Lines: 3274
Relevant Lines: 3499

💛 - Coveralls

antusus
antusus previously approved these changes Feb 25, 2022
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.

👍

class CCGAuth(ServerAuth):
_GRANT_TYPE = 'client_credentials'

def _fetch_access_token(self, sub: str, sub_type: str, now_time: Optional[datetime] = None) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should not shorten the names and have it: subject_id, subject_type?

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.

👍

@lukaszsocha2 lukaszsocha2 merged commit d33d16d into main Feb 25, 2022
@lukaszsocha2 lukaszsocha2 deleted the sdk-1574-support-ccg-auth branch February 25, 2022 12:18
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.

None yet

3 participants