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: accessing granted scopes #441

Merged
merged 2 commits into from
Mar 30, 2023
Merged

feat: accessing granted scopes #441

merged 2 commits into from
Mar 30, 2023

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Mar 16, 2023

b/253077796

Adds support for accessing granted scopes on the OAuth2 service class

Q: Does this need to be accessible by the end user?

  • Yes

Q: If so, how will this be accessible by the end user?

  • Exposing a method such as getGrantedScopes on the Credentials object is sufficient for this library.

Q: How is this different from the existing getScopes method?

  • It wouldn't be any different for the other credentials types, only for OAuth2 and UserRefreshCredentials, because they get information back from the API

@bshaffer bshaffer marked this pull request as ready for review March 21, 2023 21:07
@bshaffer bshaffer requested a review from a team as a code owner March 21, 2023 21:07
@bshaffer bshaffer merged commit 3e5c9f1 into main Mar 30, 2023
@bshaffer bshaffer deleted the expose-granted-scope branch March 30, 2023 19:35
@TimurSadykov
Copy link
Member

Sorry for the late comment, sorry if any confusion. Any reason why scopes were shared via credential, not the access token?

@bshaffer
Copy link
Contributor Author

bshaffer commented Mar 31, 2023

Hi @TimurSadykov !
If you mean why it isn't part of the class AccessToken, that's because that class is only a utility class used for validation and not used by the downstream client libraries during authentication. The credentials are the objects accessed by the downstream client libraries

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.

4 participants