Class AccessTokenResponse

java.lang.Object
org.forgerock.am.oauth2.AccessTokenResponse

@Immutable public final class AccessTokenResponse extends Object
Encapsulates the minted access token along with its contextual data.
Since:
7.0.0
  • Method Details

    • getAccessToken

      public String getAccessToken()
      Gets the non-null access token.
      Returns:
      the non-null access token
    • getTokenType

      public String getTokenType()
      Gets the non-null token type.
      Returns:
      the non-null token type
    • getExpiresIn

      public Duration getExpiresIn()
      Gets the non-null expires in duration which is the actual time in millis when the token will expire.
      Returns:
      the non-null expires in duration
    • getScopes

      public Set<String> getScopes()
      Gets the scopes associated with the access token.
      Returns:
      the set of scopes associated with the access token
    • builder

      public static AccessTokenResponse.Builder builder()
      Provides a builder instance to help construct a new access token response.
      Returns:
      a builder instance