Class OAuth2InfoContext
java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.openig.filter.oauth2.client.OAuth2InfoContext
- All Implemented Interfaces:
Context
Context holding the OAuth2 information gathered after a successful user authentication and authorization.
Note that getAccessTokenResponse() may return outdated information if the access token has been refreshed
since the initial token acquisition. Use other methods to get up-to-date information.
-
Field Summary
Fields inherited from class org.forgerock.services.context.AbstractContext
data -
Method Summary
Modifier and TypeMethodDescriptionReturns the OAuth2 access token.Returns the OAuth2 access token time to live in seconds, if any..Returns the access token response content.Returns the OAuth2 client endpoint.Returns the OAuth2 client registration ID.Returns the OIDC ID token.Returns the ID Token claims set, if any.Returns the OAuth2 refresh token.Returns the OAuth2 scopes granted.Returns the user info retrieved from the OIDC UserInfo endpoint. May be empty.Methods inherited from class org.forgerock.services.context.AbstractContext
as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString
-
Method Details
-
getUserInfo
Returns the user info retrieved from the OIDC UserInfo endpoint. May be empty.- Returns:
- the user info retrieved from the OIDC UserInfo endpoint. May be empty
-
getAccessToken
Returns the OAuth2 access token.- Returns:
- the OAuth2 access token
-
getRefreshToken
Returns the OAuth2 refresh token.- Returns:
- the OAuth2 refresh token
-
getIdToken
Returns the OIDC ID token.Note that it is not recommended to re-use this token after the initial authentication as it may have expired.
- Returns:
- the OIDC ID token
-
getClientRegistrationId
Returns the OAuth2 client registration ID.- Returns:
- the OAuth2 client registration ID
-
getClientEndpoint
Returns the OAuth2 client endpoint.- Returns:
- the OAuth2 client endpoint
-
getAccessTokenExpiresIn
Returns the OAuth2 access token time to live in seconds, if any..- Returns:
- the OAuth2 access token time to live in seconds, if any.
-
getScopes
Returns the OAuth2 scopes granted.- Returns:
- the OAuth2 scopes granted
-
getIdTokenClaims
Returns the ID Token claims set, if any.Note that it is not recommended to re-use these claims after the initial authentication as they may have expired.
- Returns:
- the ID Token claims set, if any.
-
getAccessTokenResponse
Returns the access token response content.Note that this may contain outdated information if the access token has been refreshed since the initial token acquisition. Use other methods to get up-to-date information.
- Returns:
- the access token response content.
-