diff --git a/docs/user-guide.rst b/docs/user-guide.rst index 6674c5aef..4a45cde91 100644 --- a/docs/user-guide.rst +++ b/docs/user-guide.rst @@ -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 ::