Class TokenResponse

  • Direct Known Subclasses:
    OpenIdTokenResponse

    @Introspected
    public class TokenResponse
    extends java.lang.Object
    Represent the response of an authorization server to a valid access token request.
    Since:
    1.2.0
    Author:
    Sergio del Amo
    See Also:
    • Constructor Detail

      • TokenResponse

        public TokenResponse()
        Instantiates Access Token Response.
    • Method Detail

      • getAccessToken

        @Nonnull
        public java.lang.String getAccessToken()
        Returns:
        The access token issued by the authorization server.
      • setAccessToken

        public void setAccessToken​(@Nonnull
                                   java.lang.String accessToken)
        Parameters:
        accessToken - The access token issued by the authorization server.
      • getTokenType

        @Nonnull
        public java.lang.String getTokenType()
        Returns:
        The type of the token issued.
      • setTokenType

        public void setTokenType​(@Nonnull
                                 java.lang.String tokenType)
        Parameters:
        tokenType - The type of the token issued.
      • getExpiresIn

        @Nullable
        public java.lang.Integer getExpiresIn()
        Returns:
        The lifetime in seconds of the access token.
      • setExpiresIn

        public void setExpiresIn​(@Nullable
                                 java.lang.Integer expiresIn)
        Parameters:
        expiresIn - The lifetime in seconds of the access token.
      • getScope

        @Nullable
        public java.lang.String getScope()
        Returns:
        Scope of the access token.
      • setScope

        public void setScope​(@Nullable
                             java.lang.String scope)
        Parameters:
        scope - Scope of the access token.
      • getRefreshToken

        @Nullable
        public java.lang.String getRefreshToken()
        Returns:
        The refresh token, which can be used to obtain new access tokens using the same authorization grant.
      • setRefreshToken

        public void setRefreshToken​(@Nullable
                                    java.lang.String refreshToken)
        Parameters:
        refreshToken - The refresh token, which can be used to obtain new access tokens using the same authorization grant.