Class ServerAccessToken
java.lang.Object
org.apache.cxf.rs.security.oauth2.common.AccessToken
org.apache.cxf.rs.security.oauth2.common.ServerAccessToken
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BearerAccessToken,HawkAccessToken,RefreshToken
Server Access Token representation
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedServerAccessToken(Client client, String tokenType, String tokenKey, long expiresIn) protectedServerAccessToken(Client client, String tokenType, String tokenKey, long expiresIn, long issuedAt) protectedServerAccessToken(ServerAccessToken token, String key) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Client associated with this tokenGet the grant codeReturns the grant type which was used to obtain the access tokengetNonce()Get the response typeReturns a list of opaque permissions/scopesReturns a subject capturing the login name the end user used to login to the resource server when authorizing a given client requestvoidsetAudiences(List<String> audiences) voidvoidsetClientCodeVerifier(String clientCodeVerifier) voidsetExtraProperties(Map<String, String> extraProperties) voidsetGrantCode(String grantCode) Set the grant code which was used to request the tokenvoidsetGrantType(String grantType) Sets the grant type which was used to obtain the access tokenvoidvoidsetResponseType(String responseType) Set the response typevoidsetScopes(List<OAuthPermission> scopes) Sets a list of opaque permissions/scopesvoidsetSubject(UserSubject subject) Sets a subject capturing the login name the end user used to login to the resource server when authorizing a given client requestprotected static ServerAccessTokenvalidateTokenType(ServerAccessToken token, String expectedType) Methods inherited from class org.apache.cxf.rs.security.oauth2.common.AccessToken
getEncodedToken, getExpiresIn, getIssuedAt, getIssuer, getNotBefore, getParameters, getRefreshToken, getTokenKey, getTokenType, setEncodedToken, setExpiresIn, setIssuedAt, setIssuer, setNotBefore, setParameters, setRefreshToken, setTokenKey, setTokenType
-
Constructor Details
-
ServerAccessToken
protected ServerAccessToken() -
ServerAccessToken
-
ServerAccessToken
-
ServerAccessToken
-
-
Method Details
-
validateTokenType
-
getClient
Returns the Client associated with this token- Returns:
- the client
-
setClient
-
getScopes
Returns a list of opaque permissions/scopes- Returns:
- the scopes
-
setScopes
Sets a list of opaque permissions/scopes- Parameters:
scopes- the scopes
-
getSubject
Returns a subject capturing the login name the end user used to login to the resource server when authorizing a given client request- Returns:
- UserSubject
-
setSubject
Sets a subject capturing the login name the end user used to login to the resource server when authorizing a given client request- Parameters:
subject-
-
getGrantType
Returns the grant type which was used to obtain the access token- Returns:
- the grant type
-
setGrantType
Sets the grant type which was used to obtain the access token- Parameters:
grantType- the grant type
-
getResponseType
Get the response type- Returns:
- the response type, null if no redirection flow was used
-
setResponseType
Set the response type- Parameters:
responseType- the response type
-
getAudiences
-
setAudiences
-
getClientCodeVerifier
-
setClientCodeVerifier
-
getNonce
-
setNonce
-
getExtraProperties
-
setExtraProperties
-
getGrantCode
Get the grant code- Returns:
- the grant code, null if no authorization code grant was used
-
setGrantCode
Set the grant code which was used to request the token- Parameters:
grantCode- the grant code
-