Class TokenExchangeResponse


  • public class TokenExchangeResponse
    extends java.lang.Object
    Response from a token exchange request. Contains either the access token information or error details.
    • Method Detail

      • isSuccess

        public boolean isSuccess()
        Returns:
        true if the token exchange was successful, false otherwise
      • getAccessToken

        @Nullable
        public java.lang.String getAccessToken()
        Returns:
        the access token if successful, null otherwise
      • getTokenType

        @Nullable
        public java.lang.String getTokenType()
        Returns:
        the token type (usually "Bearer") if successful, null otherwise
      • getExpiresIn

        public int getExpiresIn()
        Returns:
        the number of seconds the access token is valid for, 0 if not provided or on error
      • getScope

        @Nullable
        public java.lang.String getScope()
        Returns:
        the scope of the access token if provided, null otherwise
      • getRefreshToken

        @Nullable
        public java.lang.String getRefreshToken()
        Returns:
        the refresh token if provided, null otherwise
      • getError

        @Nullable
        public java.lang.String getError()
        Returns:
        the error code if the request failed, null if successful
      • getErrorDescription

        @Nullable
        public java.lang.String getErrorDescription()
        Returns:
        the error description if the request failed, null if successful