Class TokenResponse

    • Constructor Detail

      • TokenResponse

        public TokenResponse()
        Instantiates Access Token Response.
      • TokenResponse

        public TokenResponse​(@NonNull
                             java.lang.String accessToken,
                             @NonNull
                             java.lang.String tokenType)
        Instantiates Access Token Response.
        Parameters:
        accessToken - Access token issued by the authorization server.
        tokenType - The type of the token issued.
    • 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.
      • getExpiresInDate

        @NonNull
        public java.util.Optional<java.util.Date> getExpiresInDate()
        Returns:
        Expiration date of the access token. Calculated with the expiresIn received by the authorization server.
      • 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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object