Class TokenResponse


  • @Immutable
    public final class TokenResponse
    extends Object
    A token response, see RFC6749 section 5.1.
    • Field Detail

      • idToken

        @Nonnull
        private final String idToken
        The OIDC ID token string base64 encoded.
      • accessToken

        @Nonnull
        private final String accessToken
        The access token issued by the authorization server.
      • refreshToken

        @Nullable
        private final String refreshToken
        The refresh token, which can be used to obtain new access tokens using the same authorization grant.
      • tokenType

        @Nonnull
        private final String tokenType
        The token type e.g. Bearer. Value is case insensitive
      • expiresIn

        @Nullable
        private final Integer expiresIn
        The lifetime in seconds of the access token.
      • scope

        @Nullable
        private final String scope
        The scope requested by the client.
    • Constructor Detail

      • TokenResponse

        private TokenResponse​(TokenResponse.Builder builder)
        Constructor.
        Parameters:
        builder - the builder.
    • Method Detail

      • getIdToken

        public final String getIdToken()
        Get the ID token.
        Returns:
        Returns the idToken.
      • getAccessToken

        public final String getAccessToken()
        Get the access token.
        Returns:
        Returns the accessToken.
      • getRefreshToken

        public final String getRefreshToken()
        Get the refresh token.
        Returns:
        Returns the refreshToken.
      • getTokenType

        public final String getTokenType()
        Get the token type.
        Returns:
        Returns the tokenType.
      • getExpiresIn

        public final Integer getExpiresIn()
        Get how long the access token is valid for in seconds.
        Returns:
        Returns the expiresIn.
      • getScope

        public final String getScope()
        Get the requested scope.
        Returns:
        Returns the scope.