Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -479,16 +479,16 @@ IDToken verification can be done for various type of IDTokens using the
and ES256 algorithms. However, ES256 algorithm won't be available unless
`cryptography` dependency of version at least 1.4.0 is installed. You can check
the dependency with `pip freeze` or try `from google.auth.crypt import es256`.
The following is an example of verifying ID tokens:
The following is an example of verifying ID tokens ::

from google.auth2 import id_token

request = google.auth.transport.requests.Request()

try:
decoded_token = id_token.verify_token(token_to_verify,request)
decoded_token = id_token.verify_token(token_to_verify,request)
except ValueError:
# Verification failed.
# Verification failed.

A sample end-to-end flow using an ID Token against a Cloud Run endpoint maybe ::

Expand Down