@Beta
public class GoogleIdToken
extends com.google.api.client.auth.openidconnect.IdToken
Beta
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.
Modifier and Type | Class and Description |
---|---|
static class |
GoogleIdToken.Payload
Beta 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, 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–2019 Google. All rights reserved.