public class GoogleIdToken extends IdToken
Beta
Google ID tokens as specified in OpenID Connect.
Google ID tokens contain useful information about the authorized end user. Google ID tokens are signed and the signature must be verified using #verify(GoogleIdTokenVerifier).
Implementation is not thread-safe.
Inheritance
java.lang.Object > JsonWebToken > JsonWebSignature > com.google.api.client.auth.openidconnect.IdToken > GoogleIdTokenStatic Methods
parse(JsonFactory jsonFactory, String idTokenString)
public static GoogleIdToken parse(JsonFactory jsonFactory, String idTokenString)
Parses the given ID token string and returns the parsed GoogleIdToken.
Name | Description |
jsonFactory | com.google.api.client.json.JsonFactory JSON factory |
idTokenString | String ID token string |
Type | Description |
GoogleIdToken | parsed Google ID token |
Type | Description |
IOException |
Constructors
GoogleIdToken(JsonWebSignature.Header header, GoogleIdToken.Payload payload, byte[] signatureBytes, byte[] signedContentBytes)
public GoogleIdToken(JsonWebSignature.Header header, GoogleIdToken.Payload payload, byte[] signatureBytes, byte[] signedContentBytes)
Name | Description |
header | com.google.api.client.json.webtoken.JsonWebSignature.Header header |
payload | GoogleIdToken.Payload payload |
signatureBytes | byte[] bytes of the signature |
signedContentBytes | byte[] bytes of the signature content |
Methods
getPayload()
public GoogleIdToken.Payload getPayload()
Type | Description |
GoogleIdToken.Payload |
verify(GoogleIdTokenVerifier verifier)
public boolean verify(GoogleIdTokenVerifier verifier)
Verifies that this ID token is valid using GoogleIdTokenVerifier#verify(GoogleIdToken).
Name | Description |
verifier | GoogleIdTokenVerifier |
Type | Description |
boolean |
Type | Description |
GeneralSecurityException | |
IOException |