Class AuthorizationResponse

java.lang.Object
io.jans.as.client.BaseResponse
io.jans.as.client.AuthorizationResponse

public class AuthorizationResponse extends BaseResponse
Represents an authorization response received from the authorization server.
Version:
November 22, 2021
Author:
Javier Rojas Blum
  • Field Details

    • response

      protected String response
    • issuer

      protected String issuer
    • audience

      protected String audience
    • exp

      protected Integer exp
  • Constructor Details

    • AuthorizationResponse

      public AuthorizationResponse(jakarta.ws.rs.core.Response clientResponse)
      Constructs an authorization response.
    • AuthorizationResponse

      public AuthorizationResponse(String location)
    • AuthorizationResponse

      public AuthorizationResponse(String location, String sharedKey, PrivateKey privateKey, String jwksUri)
  • Method Details

    • getErrorTypeString

      public String getErrorTypeString()
    • setErrorTypeString

      public void setErrorTypeString(String errorTypeString)
    • getCode

      public String getCode()
      Returns the authorization code generated by the authorization server.
      Returns:
      The authorization code.
    • setCode

      public void setCode(String code)
      Sets the authorization code generated by the authorization server.
      Parameters:
      code - The authorization code.
    • getAccessToken

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

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

      public String getSid()
    • setSid

      public void setSid(String sid)
    • getDeviceSecret

      public String getDeviceSecret()
    • setDeviceSecret

      public void setDeviceSecret(String deviceSecret)
    • getSessionId

      public String getSessionId()
      Gets session id.
      Returns:
      session id.
    • setSessionId

      public void setSessionId(String sessionId)
      Sets session id.
      Parameters:
      sessionId - session id.
    • getLogoutStatusJwt

      public String getLogoutStatusJwt()
      Logout status jwt
      Returns:
      logout status jwt
    • setLogoutStatusJwt

      public AuthorizationResponse setLogoutStatusJwt(String logoutStatusJwt)
      Logout Status jwt
      Parameters:
      logoutStatusJwt - logout status jwt
      Returns:
      response
    • getCustomParams

      public Map<String,String> getCustomParams()
    • setCustomParams

      public void setCustomParams(Map<String,String> customParams)
    • getResponseMode

      public io.jans.as.model.common.ResponseMode getResponseMode()
    • setResponseMode

      public void setResponseMode(io.jans.as.model.common.ResponseMode responseMode)
    • getResponse

      public String getResponse()
    • setResponse

      public void setResponse(String response)
    • getIssuer

      public String getIssuer()
    • setIssuer

      public void setIssuer(String issuer)
    • getAudience

      public String getAudience()
    • setAudience

      public void setAudience(String audience)
    • getExp

      public Integer getExp()
    • setExp

      public void setExp(Integer exp)
    • 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.
    • 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.
    • getExpiresIn

      public Integer getExpiresIn()
      Returns the lifetime in seconds of the access token. For example, the value 3600 denotes that the access token will expire in one hour from the time the response was generated.
      Returns:
      The lifetime in seconds of the access token.
    • setExpiresIn

      public void setExpiresIn(Integer expiresIn)
      Sets the lifetime in seconds of the access token. For example, the value 3600 denotes that the access token will expire in one hour from the time the response was generated.
      Parameters:
      expiresIn - The lifetime in seconds of the access token.
    • getScope

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

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

      public String getIdToken()
      Returns the ID Token of the for the authentication session.
      Returns:
      The ID Token.
    • setIdToken

      public void setIdToken(String idToken)
      Sets the ID Token of the for the authentication session.
      Parameters:
      idToken - The ID Token.
    • getState

      public String getState()
      Returns the state. If the state parameter was present in the client authorization request, the exact value received from the client.
      Returns:
      The state.
    • setState

      public void setState(String state)
      Sets the state. If the state parameter was present in the client authorization request, the exact value received from the client.
      Parameters:
      state - The state.
    • getErrorType

      public io.jans.as.model.authorize.AuthorizeErrorResponseType getErrorType()
      Returns the error code when the request fails, otherwise will return null.
      Returns:
      The error code when the request fails.
    • setErrorType

      public void setErrorType(io.jans.as.model.authorize.AuthorizeErrorResponseType errorType)
      Sets the error code when the request fails, otherwise will return null.
      Parameters:
      errorType - The error code when the request fails.
    • getErrorDescription

      public String getErrorDescription()
      Returns a human-readable UTF-8 encoded text providing additional information, used to assist the client developer in understanding the error that occurred.
      Returns:
      The error description.
    • setErrorDescription

      public void setErrorDescription(String errorDescription)
      Sets a human-readable UTF-8 encoded text providing additional information, used to assist the client developer in understanding the error that occurred.
      Parameters:
      errorDescription - The error description.
    • getErrorUri

      public String getErrorUri()
      Returns a URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
      Returns:
      A URI with information about the error.
    • setErrorUri

      public void setErrorUri(String errorUri)
      Sets a URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
      Parameters:
      errorUri - A URI with information about the error.