Package io.jans.as.client
Class AuthorizationResponse
java.lang.Object
io.jans.as.client.BaseResponse
io.jans.as.client.AuthorizationResponse
Represents an authorization response received from the authorization server.
- Version:
- November 22, 2021
- Author:
- Javier Rojas Blum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected Integer
protected String
protected String
Fields inherited from class io.jans.as.client.BaseResponse
entity, headers, location, status
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationResponse
(jakarta.ws.rs.core.Response clientResponse) Constructs an authorization response.AuthorizationResponse
(String location) AuthorizationResponse
(String location, String sharedKey, PrivateKey privateKey, String jwksUri) -
Method Summary
Modifier and TypeMethodDescriptionReturns the access token issued by the authorization server.getCode()
Returns the authorization code generated by the authorization server.Returns a human-readable UTF-8 encoded text providing additional information, used to assist the client developer in understanding the error that occurred.io.jans.as.model.authorize.AuthorizeErrorResponseType
Returns the error code when the request fails, otherwise will returnnull
.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.getExp()
Returns the lifetime in seconds of the access token.Returns the ID Token of the for the authentication session.Logout status jwtio.jans.as.model.common.ResponseMode
getScope()
Returns the scope of the access token.Gets session id.getSid()
getState()
Returns the state.io.jans.as.model.common.TokenType
Returns the type of the token issued (value is case insensitive).void
setAccessToken
(String accessToken) Sets the access token issued by the authorization server.void
setAudience
(String audience) void
Sets the authorization code generated by the authorization server.void
setCustomParams
(Map<String, String> customParams) void
setDeviceSecret
(String deviceSecret) 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.void
setErrorType
(io.jans.as.model.authorize.AuthorizeErrorResponseType errorType) Sets the error code when the request fails, otherwise will returnnull
.void
setErrorTypeString
(String errorTypeString) 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.void
void
setExpiresIn
(Integer expiresIn) Sets the lifetime in seconds of the access token.void
setIdToken
(String idToken) Sets the ID Token of the for the authentication session.void
setLogoutStatusJwt
(String logoutStatusJwt) Logout Status jwtvoid
setResponse
(String response) void
setResponseMode
(io.jans.as.model.common.ResponseMode responseMode) void
Sets the scope of the access token.void
setSessionId
(String sessionId) Sets session id.void
void
Sets the state.void
setTokenType
(io.jans.as.model.common.TokenType tokenType) Sets the type of the token issued (value is case insensitive).Methods inherited from class io.jans.as.client.BaseResponse
getEntity, getHeaders, getLocation, getStatus, setEntity, setHeaders, setLocation, setStatus
-
Field Details
-
response
-
issuer
-
audience
-
exp
-
-
Constructor Details
-
AuthorizationResponse
public AuthorizationResponse(jakarta.ws.rs.core.Response clientResponse) Constructs an authorization response. -
AuthorizationResponse
-
AuthorizationResponse
public AuthorizationResponse(String location, String sharedKey, PrivateKey privateKey, String jwksUri)
-
-
Method Details
-
getErrorTypeString
-
setErrorTypeString
-
getCode
Returns the authorization code generated by the authorization server.- Returns:
- The authorization code.
-
setCode
Sets the authorization code generated by the authorization server.- Parameters:
code
- The authorization code.
-
getAccessToken
Returns the access token issued by the authorization server.- Returns:
- The access token.
-
setAccessToken
Sets the access token issued by the authorization server.- Parameters:
accessToken
- The access token.
-
getSid
-
setSid
-
getDeviceSecret
-
setDeviceSecret
-
getSessionId
Gets session id.- Returns:
- session id.
-
setSessionId
Sets session id.- Parameters:
sessionId
- session id.
-
getLogoutStatusJwt
Logout status jwt- Returns:
- logout status jwt
-
setLogoutStatusJwt
Logout Status jwt- Parameters:
logoutStatusJwt
- logout status jwt- Returns:
- response
-
getCustomParams
-
setCustomParams
-
getResponseMode
public io.jans.as.model.common.ResponseMode getResponseMode() -
setResponseMode
public void setResponseMode(io.jans.as.model.common.ResponseMode responseMode) -
getResponse
-
setResponse
-
getIssuer
-
setIssuer
-
getAudience
-
setAudience
-
getExp
-
setExp
-
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
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
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
Returns the scope of the access token.- Returns:
- The scope of the access token.
-
setScope
Sets the scope of the access token.- Parameters:
scope
- The scope of the access token.
-
getIdToken
Returns the ID Token of the for the authentication session.- Returns:
- The ID Token.
-
setIdToken
Sets the ID Token of the for the authentication session.- Parameters:
idToken
- The ID Token.
-
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
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 returnnull
.- 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 returnnull
.- Parameters:
errorType
- The error code when the request fails.
-
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
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
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
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.
-