public class GoogleIdToken
extends com.google.api.client.auth.openidconnect.IdToken
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.
Upgrade warning: in prior version 1.13 this extended
com.google.api.client.auth.jsontoken.JsonWebSignature
, but starting with version 1.14 it
now extends IdToken
.
Modifier and Type | Class and Description |
---|---|
static class |
GoogleIdToken.Payload
Google ID token payload.
|
Constructor and Description |
---|
GoogleIdToken(com.google.api.client.json.webtoken.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) . |
verifyAudience, verifyExpirationTime, verifyIssuedAtTime, verifyIssuer, verifyTime
public GoogleIdToken(com.google.api.client.json.webtoken.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 stringIOException
public boolean verify(GoogleIdTokenVerifier verifier) throws GeneralSecurityException, IOException
GoogleIdTokenVerifier.verify(GoogleIdToken)
.GeneralSecurityException
IOException
public GoogleIdToken.Payload getPayload()
getPayload
in class com.google.api.client.auth.openidconnect.IdToken
Copyright © 2010-2013 Google. All Rights Reserved.