Interface OpenIdContext

  • All Superinterfaces:
    Serializable

    public interface OpenIdContext
    extends Serializable
    An injectable interface that provides access to access token, identity token, claims and OpenId Connect provider related information.
    Author:
    Gaurav Gupta
    • Method Detail

      • 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

        Optional<Long> 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.