Class OAuthContext
- java.lang.Object
-
- org.apache.cxf.rs.security.oauth2.common.OAuthContext
-
public class OAuthContext extends Object
Captures the information about the current client request which custom filters may use to further protect the endpoints
-
-
Constructor Summary
Constructors Constructor Description OAuthContext(UserSubject resourceOwnerSubject, UserSubject clientSubject, List<OAuthPermission> perms, String tokenGrantType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClientId()Returns the client which obtained the access tokenUserSubjectgetClientSubject()Gets theUserSubjectrepresenting the clientList<OAuthPermission>getPermissions()Gets the list of the permissions assigned to the current access tokenUserSubjectgetSubject()Gets theUserSubjectrepresenting the resource ownerStringgetTokenAudience()Map<String,String>getTokenExtraProperties()StringgetTokenGrantType()Returns the grant type which was used to obtain the access token the client is using now during the current requestStringgetTokenIssuer()StringgetTokenKey()Returns the access token the client is using now during the current requestString[]getTokenRequestParts()booleanisClientConfidential()voidsetClientConfidential(boolean isConfidential)voidsetClientId(String clientId)Sets the client which obtained the access tokenvoidsetTokenAudience(String audience)voidsetTokenExtraProperties(Map<String,String> tokenExtraProperties)voidsetTokenIssuer(String tokenIssuer)voidsetTokenKey(String tokenKey)Sets the access token the client is using now during the current requestvoidsetTokenRequestParts(String[] tokenRequestParts)
-
-
-
Constructor Detail
-
OAuthContext
public OAuthContext(UserSubject resourceOwnerSubject, UserSubject clientSubject, List<OAuthPermission> perms, String tokenGrantType)
-
-
Method Detail
-
getSubject
public UserSubject getSubject()
Gets theUserSubjectrepresenting the resource owner- Returns:
- the subject
-
getClientSubject
public UserSubject getClientSubject()
Gets theUserSubjectrepresenting the client- Returns:
- the subject
-
getPermissions
public List<OAuthPermission> getPermissions()
Gets the list of the permissions assigned to the current access token- Returns:
- the permissions
-
getTokenGrantType
public String getTokenGrantType()
Returns the grant type which was used to obtain the access token the client is using now during the current request- Returns:
- the grant type
-
getClientId
public String getClientId()
Returns the client which obtained the access token- Returns:
- the client id
-
setClientId
public void setClientId(String clientId)
Sets the client which obtained the access token- Parameters:
clientId-
-
getTokenKey
public String getTokenKey()
Returns the access token the client is using now during the current request- Returns:
- the token
-
setTokenKey
public void setTokenKey(String tokenKey)
Sets the access token the client is using now during the current request- Parameters:
tokenKey-
-
getTokenAudience
public String getTokenAudience()
-
setTokenAudience
public void setTokenAudience(String audience)
-
getTokenRequestParts
public String[] getTokenRequestParts()
-
setTokenRequestParts
public void setTokenRequestParts(String[] tokenRequestParts)
-
isClientConfidential
public boolean isClientConfidential()
-
setClientConfidential
public void setClientConfidential(boolean isConfidential)
-
getTokenIssuer
public String getTokenIssuer()
-
setTokenIssuer
public void setTokenIssuer(String tokenIssuer)
-
-