Skip to content

New module with OAuth2 provider implementation #282

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

Merged
merged 13 commits into from
Jun 14, 2024
Merged

Conversation

alex268
Copy link
Member

@alex268 alex268 commented Jun 7, 2024

Fix #272

@alex268 alex268 self-assigned this Jun 7, 2024
@alex268 alex268 requested review from pnv1 and alexv-smirnov June 7, 2024 19:09
@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 88.20059% with 40 lines in your changes missing coverage. Please review.

Project coverage is 45.71%. Comparing base (ef49df2) to head (e4d7f72).
Report is 6 commits behind head on master.

Files Patch % Lines
...in/java/tech/ydb/core/auth/BackgroundIdentity.java 74.02% 15 Missing and 5 partials ⚠️
...ava/tech/ydb/auth/OAuth2TokenExchangeProvider.java 94.07% 6 Missing and 2 partials ⚠️
...ain/java/tech/ydb/core/auth/StaticCredentials.java 84.00% 4 Missing and 4 partials ⚠️
...src/main/java/tech/ydb/auth/OAuth2TokenSource.java 94.80% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #282      +/-   ##
============================================
+ Coverage     44.39%   45.71%   +1.31%     
- Complexity     1571     1620      +49     
============================================
  Files           297      300       +3     
  Lines         11505    11807     +302     
  Branches       1124     1146      +22     
============================================
+ Hits           5108     5397     +289     
- Misses         5988     5999      +11     
- Partials        409      411       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alex268 alex268 force-pushed the oauth_token_credentials branch from 9b56846 to 1f83505 Compare June 8, 2024 09:29
@alex268
Copy link
Member Author

alex268 commented Jun 13, 2024

Added examples of usage with a static token and with a RSA private key

private static final Gson GSON = new Gson();

private final Clock clock;
private final String endpoint;
Copy link
Contributor

Choose a reason for hiding this comment

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

tokenEndpoint

@alex268 alex268 force-pushed the oauth_token_credentials branch from 92c45b4 to e4d7f72 Compare June 14, 2024 18:41
@alex268 alex268 merged commit cee3306 into master Jun 14, 2024
7 checks passed
@alex268 alex268 deleted the oauth_token_credentials branch June 14, 2024 21:49
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 of OAuth 2.0 Token Exchange
4 participants