-
Notifications
You must be signed in to change notification settings - Fork 309
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
Expose id_token in OAuth 2.0 credentials #150
Conversation
google/oauth2/credentials.py
Outdated
@@ -90,6 +91,17 @@ def client_secret(self): | |||
return self._client_secret | |||
|
|||
@property | |||
def refresh_grant_response(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/oauth2/service_account.py
Outdated
@@ -306,10 +319,11 @@ def _make_authorization_grant_assertion(self): | |||
@_helpers.copy_docstring(credentials.Credentials) | |||
def refresh(self, request): | |||
assertion = self._make_authorization_grant_assertion() | |||
access_token, expiry, _ = _client.jwt_grant( | |||
access_token, expiry, refresh_grant_response = _client.jwt_grant( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dhermes updated. PTAL. |
google/oauth2/credentials.py
Outdated
self._scopes = scopes | ||
self._token_uri = token_uri | ||
self._client_id = client_id | ||
self._client_secret = client_secret | ||
self._refresh_grant_response = None |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/oauth2/credentials.py
Outdated
|
||
self.token = access_token | ||
self.expiry = expiry | ||
self._refresh_token = refresh_token | ||
self._id_token = grant_response.get('id_token', self._id_token) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Resolves #149