Remove oauth2client usage in endpoints samples#1002
Merged
Conversation
2cb5844 to
5397897
Compare
andrewsg
approved these changes
Jun 26, 2017
| def get_id_token(client_secrets_file, extra_args): | ||
| storage = oauth2client.file.Storage('credentials.dat') | ||
| credentials = storage.get() | ||
| """Obtains credentials form the user using OAuth 2.0 and then returns the |
| import oauth2client.client | ||
| import oauth2client.file | ||
| import oauth2client.tools | ||
| import google_auth_oauthlib.flow |
Member
There was a problem hiding this comment.
This seems to be accurate, but just out of curiosity, why is google.auth a thing and google_auth also a thing?
Contributor
Author
There was a problem hiding this comment.
Two reasons:
- We wanted to get google.auth to a v1.0.0 interface as quickly as possible to avoid thrashing. To do this, we descoped several contentious features from the library. We split the "User Auth" featureset into a separate library,
google-auth-oauthlib, in order to be able to iterate without worrying about breaking thev1.0.0interface ofgoogle-auth. Once that separate library has a solid interface, we can merge it intogoogle-authas a1.xfeature. - We didn't want to make
google.autha namespace package because when we do promote the auxiliary packages we do not break existing code using the separate version. So the auxiliary packages likegoogle-auth-oauthlibmust use a new global top-level namespace, in this casegoogle_auth_oauthlib.
|
generated jwt worked when i added "scope":"https://www.googleapis.com/auth/admin.directory..." to payload. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.