Conversation
dhermes
left a comment
There was a problem hiding this comment.
LGTM. Don't you want to return a boolean instead of the actual certs?
| '/securetoken@system.gserviceaccount.com') | ||
|
|
||
|
|
||
| def _fetch_certs(request, certs_url): |
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.
| raise exceptions.TransportError( | ||
| 'Could not fetch certificates at {}'.format(certs_url)) | ||
|
|
||
| return json.loads(response.data.decode('utf-8')) |
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.
| id_token (Union[str, bytes]): The encoded token. | ||
| request (google.auth.transport.Request): The object used to make | ||
| HTTP requests. | ||
| audience (str): The audience that this token is intended for. If 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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| HTTP requests. | ||
| audience (str): The audience that this token is intended for. If None | ||
| then the audience is not verified. | ||
| certs_url (str): The URL that specifies the certificates to use to |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| id_token (Union[str, bytes]): The encoded token. | ||
| request (google.auth.transport.Request): The object used to make | ||
| HTTP requests. | ||
| audience (str): The audience that this token is intended for. This is |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/oauth2/id_token.py
Outdated
| Mapping[str, Any]: The decoded token. | ||
|
|
||
| Raises: | ||
| ValueError: if verification fails. |
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/id_token.py
Outdated
| Mapping[str, Any]: The decoded token. | ||
|
|
||
| Raises: | ||
| ValueError: if verification fails. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| certs_url=_GOOGLE_OAUTH2_CERTS_URL) | ||
|
|
||
|
|
||
| def verify_firebase_token(id_token, request, audience=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.
| response = mock.Mock() | ||
| response.status = status | ||
|
|
||
| if data is not 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.
Resolves #39 and the v1.0.0 milestone.