Class AccessToken
java.lang.Object
org.apache.cxf.rs.security.oauth2.common.AccessToken
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientAccessToken,ServerAccessToken
Base Access Token representation
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAccessToken(String tokenType, String tokenKey) protectedAccessToken(String tokenType, String tokenKey, long expiresIn, long issuedAt) protectedAccessToken(String tokenType, String tokenKey, long expiresIn, long issuedAt, String refreshToken, Map<String, String> parameters) -
Method Summary
Modifier and TypeMethodDescriptionlongThe token lifetimelonglongGets token parametersGets the refresh token key the client can use to obtain a new access tokenReturns the token keyReturns the token type such as bearer, mac, etcvoidsetEncodedToken(String encodedToken) voidsetExpiresIn(long expiresIn) voidsetIssuedAt(long issuedAt) voidvoidsetNotBefore(long notBefore) voidsetParameters(Map<String, String> parameters) Sets additional token parametersvoidsetRefreshToken(String refreshToken) Sets the refresh token key the client can use to obtain a new access tokenvoidsetTokenKey(String key) voidsetTokenType(String type)
-
Constructor Details
-
AccessToken
protected AccessToken() -
AccessToken
-
AccessToken
-
AccessToken
-
-
Method Details
-
getTokenType
Returns the token type such as bearer, mac, etc- Returns:
- the type
-
setTokenType
-
getTokenKey
Returns the token key- Returns:
- the key
-
setTokenKey
-
setRefreshToken
Sets the refresh token key the client can use to obtain a new access token- Parameters:
refreshToken- the refresh token
-
getRefreshToken
Gets the refresh token key the client can use to obtain a new access token- Returns:
- the refresh token
-
getParameters
Gets token parameters- Returns:
-
getExpiresIn
public long getExpiresIn()The token lifetime- Returns:
- the lifetime, -1 means no 'expires_in' parameter was returned
-
setExpiresIn
public void setExpiresIn(long expiresIn) -
getIssuedAt
public long getIssuedAt() -
setIssuedAt
public void setIssuedAt(long issuedAt) -
setParameters
Sets additional token parameters- Parameters:
parameters- the token parameters
-
getIssuer
-
setIssuer
-
getEncodedToken
-
setEncodedToken
-
getNotBefore
public long getNotBefore()- Returns:
- the Not Before" timestamp, -1 means no 'nbf' parameter was returned
-
setNotBefore
public void setNotBefore(long notBefore)
-