@Beta public class GoogleIdToken extends 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. |
JsonWebSignature.Header, JsonWebSignature.Parser
Constructor and Description |
---|
GoogleIdToken(JsonWebSignature.Header header,
GoogleIdToken.Payload payload,
byte[] signatureBytes,
byte[] signedContentBytes) |
Modifier and Type | Method and Description |
---|---|
GoogleIdToken.Payload |
getPayload() |
static GoogleIdToken |
parse(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
getHeader, getSignatureBytes, getSignedContentBytes, parser, signUsingRsaSha256, verifySignature, verifySignature, verifySignature
toString
public GoogleIdToken(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(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 IdToken
Copyright © 2010–2020 Google. All rights reserved.