Package io.jans.as.client
Class TokenResponse
- java.lang.Object
-
- io.jans.as.client.BaseResponse
-
- io.jans.as.client.BaseResponseWithErrors<io.jans.as.model.token.TokenErrorResponseType>
-
- io.jans.as.client.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
-
-
Field Summary
-
Fields inherited from class io.jans.as.client.BaseResponse
entity, headers, location, status
-
-
Constructor Summary
Constructors Constructor Description TokenResponse()TokenResponse(jakarta.ws.rs.core.Response clientResponse)Constructs a token response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.jans.as.model.token.TokenErrorResponseTypefromString(java.lang.String p_str)java.lang.StringgetAccessToken()Returns the access token issued by the authorization server.java.lang.StringgetDeviceToken()java.lang.IntegergetExpiresIn()Returns the lifetime in seconds of the access token.java.lang.StringgetIdToken()Gets the value of the id token.java.lang.StringgetRefreshToken()Returns the refresh token which can be used to obtain new access tokens using the same authorization grant.java.lang.StringgetScope()Returns the scope of the access token.io.jans.as.model.common.TokenTypegetTokenType()Returns the type of the token issued.voidinjectDataFromJson()voidinjectDataFromJson(java.lang.String json)voidsetAccessToken(java.lang.String accessToken)Sets the access token issued by the authorization server.voidsetDeviceToken(java.lang.String deviceToken)voidsetExpiresIn(java.lang.Integer expiresIn)Sets the lifetime in seconds of the access token.voidsetIdToken(java.lang.String idToken)Sets the value of the id token.voidsetRefreshToken(java.lang.String refreshToken)Sets the refresh token which can be used to obtain new access tokens using the same authorization grant.voidsetScope(java.lang.String scope)Sets the scope of the access token.voidsetTokenType(io.jans.as.model.common.TokenType tokenType)Sets the type of the token issued.-
Methods inherited from class io.jans.as.client.BaseResponseWithErrors
getClaim, getClaimMap, getClaims, getErrorDescription, getErrorType, getErrorUri, getFirstClaim, injectErrorIfExistSilently, injectErrorIfExistSilently, setClaimMap, setErrorDescription, setErrorType, setErrorUri, toString
-
Methods inherited from class io.jans.as.client.BaseResponse
getEntity, getHeaders, getLocation, getStatus, setEntity, setHeaders, setLocation, setStatus
-
-
-
-
Method Detail
-
fromString
public io.jans.as.model.token.TokenErrorResponseType fromString(java.lang.String p_str)
- Specified by:
fromStringin classBaseResponseWithErrors<io.jans.as.model.token.TokenErrorResponseType>
-
injectDataFromJson
public void injectDataFromJson()
-
injectDataFromJson
public void injectDataFromJson(java.lang.String json)
- Overrides:
injectDataFromJsonin classBaseResponseWithErrors<io.jans.as.model.token.TokenErrorResponseType>
-
getDeviceToken
public java.lang.String getDeviceToken()
-
setDeviceToken
public void setDeviceToken(java.lang.String deviceToken)
-
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.
-
-