public class GoogleIdToken
extends com.google.api.client.auth.jsontoken.JsonWebSignature
Google ID tokens contain useful information such as the obfuscated
Google user ID. Google ID tokens are signed and the signature must be verified using
verify(GoogleIdTokenVerifier), which also checks that your application's client ID is
the intended audience.
Implementation is not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
GoogleIdToken.Payload
Google ID token payload.
|
| Constructor and Description |
|---|
GoogleIdToken(com.google.api.client.auth.jsontoken.JsonWebSignature.Header header,
GoogleIdToken.Payload payload,
byte[] signatureBytes,
byte[] signedContentBytes) |
| Modifier and Type | Method and Description |
|---|---|
GoogleIdToken.Payload |
getPayload() |
static GoogleIdToken |
parse(com.google.api.client.json.JsonFactory jsonFactory,
String idTokenString)
Parses the given ID token string and returns the parsed
GoogleIdToken. |
boolean |
verify(GoogleIdTokenVerifier verifier)
Verifies that this ID token is valid using
GoogleIdTokenVerifier.verify(GoogleIdToken). |
public GoogleIdToken(com.google.api.client.auth.jsontoken.JsonWebSignature.Header header,
GoogleIdToken.Payload payload,
byte[] signatureBytes,
byte[] signedContentBytes)
header - headerpayload - payloadsignatureBytes - bytes of the signaturesignedContentBytes - bytes of the signature contentpublic static GoogleIdToken parse(com.google.api.client.json.JsonFactory jsonFactory, String idTokenString) throws IOException
GoogleIdToken.jsonFactory - JSON factoryidTokenString - ID token stringIOExceptionpublic boolean verify(GoogleIdTokenVerifier verifier) throws GeneralSecurityException, IOException
GoogleIdTokenVerifier.verify(GoogleIdToken).GeneralSecurityExceptionIOExceptionpublic GoogleIdToken.Payload getPayload()
getPayload in class com.google.api.client.auth.jsontoken.JsonWebTokenCopyright © 2010-2013 Google. All Rights Reserved.