Top Description Methods
jakarta.security.enterprise.identitystore.openid

public Interface OpenIdContext

extends Serializable
Imports
java.io.Serializable, java.util.Optional, jakarta.json.JsonObject, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse

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 TypeMethod and Description
public AccessToken

Returns:

the authorization token that was received from the OpenId Connect provider
getAccessToken
()

public OpenIdClaims

Returns:

the OpenIdClaims instance
getClaims
()

Gets the User Claims that were received from the userinfo endpoint

public JsonObject

Returns:

the claims json
getClaimsJson
()

Gets the User Claims that were received from the userinfo endpoint

public Optional<Long>

Returns:

the time that the access token is granted for, if it is set to expire
getExpiresIn
()

public IdentityToken

Returns:

the identity token that was received from the OpenId Connect provider
getIdentityToken
()

public JsonObject

Returns:

the OpenId Connect Provider's metadata document fetched via provider URI.
getProviderMetadata
()

public Optional<RefreshToken>

Returns:

the refresh token that can be used to get a new access token
getRefreshToken
()

public <T> Optional<T>
getStoredValue(HttpServletRequest request, HttpServletResponse response, String key)

Retrieves the Stored value from Storage Controller.

public String

Returns:

the subject identifier
getSubject
()

Subject Identifier.

public String

Returns:

the token type value
getTokenType
()

Gets the token type value.

Method Detail

getAccessTokenback to summary
public AccessToken getAccessToken()
Returns:AccessToken

the authorization token that was received from the OpenId Connect provider

getClaimsback to summary
public OpenIdClaims getClaims()

Gets the User Claims that were received from the userinfo endpoint

Returns:OpenIdClaims

the OpenIdClaims instance

getClaimsJsonback to summary
public JsonObject getClaimsJson()

Gets the User Claims that were received from the userinfo endpoint

Returns:JsonObject

the claims json

getExpiresInback to summary
public Optional<Long> getExpiresIn()
Returns:Optional<Long>

the time that the access token is granted for, if it is set to expire

getIdentityTokenback to summary
public IdentityToken getIdentityToken()
Returns:IdentityToken

the identity token that was received from the OpenId Connect provider

getProviderMetadataback to summary
public JsonObject getProviderMetadata()
Returns:JsonObject

the OpenId Connect Provider's metadata document fetched via provider URI.

getRefreshTokenback to summary
public Optional<RefreshToken> getRefreshToken()
Returns:Optional<RefreshToken>

the refresh token that can be used to get a new access token

getStoredValueback to summary
public <T> Optional<T> getStoredValue(HttpServletRequest request, HttpServletResponse response, String key)

Retrieves the Stored value from Storage Controller.

getSubjectback to summary
public 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:String

the subject identifier

getTokenTypeback to summary
public 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:String

the token type value