Interface OpenIdContext
- All Superinterfaces:
Serializable
An injectable interface that provides access to access token, identity token,
claims and OpenId Connect provider related information.
- Author:
- Gaurav Gupta
-
Method Summary
Modifier and TypeMethodDescriptionGets the User Claims that were received from the userinfo endpointGets the User Claims that were received from the userinfo endpoint<T> Optional<T>
getStoredValue
(HttpServletRequest request, HttpServletResponse response, String key) Retrieves the Stored value from Storage Controller.Subject Identifier.Gets the token type value.
-
Method Details
-
getSubject
String getSubject()Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client- Returns:
- the subject identifier
-
getTokenType
String getTokenType()Gets the token type value. The value MUST be Bearer or another token_type value that the Client has negotiated with the Authorization Server.- Returns:
- the token type value
-
getAccessToken
AccessToken getAccessToken()- Returns:
- the authorization token that was received from the OpenId Connect provider
-
getIdentityToken
IdentityToken getIdentityToken()- Returns:
- the identity token that was received from the OpenId Connect provider
-
getRefreshToken
Optional<RefreshToken> getRefreshToken()- Returns:
- the refresh token that can be used to get a new access token
-
getExpiresIn
- Returns:
- the time that the access token is granted for, if it is set to expire
-
getClaimsJson
JsonObject getClaimsJson()Gets the User Claims that were received from the userinfo endpoint- Returns:
- the claims json
-
getClaims
OpenIdClaims getClaims()Gets the User Claims that were received from the userinfo endpoint- Returns:
- the
OpenIdClaims
instance
-
getProviderMetadata
JsonObject getProviderMetadata()- Returns:
- the OpenId Connect Provider's metadata document fetched via provider URI.
-
getStoredValue
<T> Optional<T> getStoredValue(HttpServletRequest request, HttpServletResponse response, String key) Retrieves the Stored value from Storage Controller.- Type Parameters:
T
-- Parameters:
request
-response
-key
-- Returns:
-