Class TokenResponse


  • public class TokenResponse
    extends BaseResponseWithErrors<io.jans.as.model.token.TokenErrorResponseType>
    Represents a token response received from the authorization server.
    Author:
    Javier Rojas Blum Date: 10.19.2011
    • Constructor Detail

      • TokenResponse

        public TokenResponse()
      • TokenResponse

        public TokenResponse​(javax.ws.rs.core.Response clientResponse)
        Constructs a token response.
        Parameters:
        clientResponse - The response
    • Method Detail

      • fromString

        public io.jans.as.model.token.TokenErrorResponseType fromString​(java.lang.String p_str)
        Specified by:
        fromString in class BaseResponseWithErrors<io.jans.as.model.token.TokenErrorResponseType>
      • injectDataFromJson

        public void injectDataFromJson()
      • getAccessToken

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

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

        public io.jans.as.model.common.TokenType getTokenType()
        Returns the type of the token issued. Value is case insensitive.
        Returns:
        The type of the token issued.
      • setTokenType

        public void setTokenType​(io.jans.as.model.common.TokenType tokenType)
        Sets the type of the token issued. Value is case insensitive.
        Parameters:
        tokenType - The type of the token issued.
      • getExpiresIn

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

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

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

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

        public java.lang.String getScope()
        Returns the scope of the access token.
        Returns:
        The scope of the access token.
      • setScope

        public void setScope​(java.lang.String scope)
        Sets the scope of the access token.
        Parameters:
        scope - The scope of the access token.
      • getIdToken

        public java.lang.String getIdToken()
        Gets the value of the id token.
        Returns:
        The id token.
      • setIdToken

        public void setIdToken​(java.lang.String idToken)
        Sets the value of the id token.
        Parameters:
        idToken - The id token.