Classes
IdToken
Beta
ID token as described in ID Token.
Use #parse(JsonFactory, String) to parse an ID token from a string. Then, use the
verify
methods to verify the ID token as required by the specification.
Implementation is not thread-safe.
IdToken.Payload
Beta
ID token payload.
IdTokenResponse
Beta
OAuth ID Connect JSON model for a successful access token response as specified in OpenID Connect Basic Client
Profile 1.0 (draft 23).
Implementation is not thread-safe. Sample usage:
static JsonWebSignature executeIdToken(TokenRequest tokenRequest) throws IOException { IdTokenResponse idTokenResponse = IdTokenResponse.execute(tokenRequest); return idTokenResponse.parseIdToken(); }
IdTokenVerifier
Beta
Thread-safe ID token verifier based on ID Token
Validation.
Call #verify(IdToken) to verify a ID token. This is a light-weight object, so you may use a new instance for each configuration of expected issuer and trusted client IDs. Sample usage:
IdTokenVerifier verifier = new IdTokenVerifier.Builder() .setIssuer("issuer.example.com") .setAudience(Arrays.asList("myClientId")) .build(); ... if (!verifier.verify(idToken)) {...}
Note that #verify(IdToken) only implements a subset of the verification steps, mostly just the MUST steps. Please read <a href="http://openid.net/specs/openid-connect-basic-1_0-27.html#id.token.validation>ID Token Validation for the full list of verification steps.
IdTokenVerifier.Builder
Beta
Builder for IdTokenVerifier.
Implementation is not thread-safe.