Class DefaultJWTRoleParser
java.lang.Object
org.apache.cxf.sts.token.validator.DefaultSubjectRoleParser
org.apache.cxf.sts.token.validator.jwt.DefaultJWTRoleParser
- All Implemented Interfaces:
JWTRoleParser,SubjectRoleParser
A default implementation to extract roles from a JWT token
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanparseRolesFromToken(Principal principal, Subject subject, JwtToken token) Return the set of User/Principal roles from the token.voidsetRoleClaim(String roleClaim) voidsetUseJaasSubject(boolean useJaasSubject) Whether to get roles from the JAAS Subject (if not null) returned from SAML Assertion Validation or not.Methods inherited from class org.apache.cxf.sts.token.validator.DefaultSubjectRoleParser
getRoleClassifier, getRoleClassifierType, parseRolesFromSubject, setRoleClassifier, setRoleClassifierTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.sts.token.validator.SubjectRoleParser
parseRolesFromSubject
-
Constructor Details
-
DefaultJWTRoleParser
public DefaultJWTRoleParser()
-
-
Method Details
-
parseRolesFromToken
Return the set of User/Principal roles from the token.- Specified by:
parseRolesFromTokenin interfaceJWTRoleParser- Parameters:
principal- the Principal associated with the tokensubject- the JAAS Subject associated with a successful validation of the tokentoken- The JWTToken- Returns:
- the set of User/Principal roles from the token.
-
isUseJaasSubject
public boolean isUseJaasSubject() -
setUseJaasSubject
public void setUseJaasSubject(boolean useJaasSubject) Whether to get roles from the JAAS Subject (if not null) returned from SAML Assertion Validation or not. The default is true.- Parameters:
useJaasSubject- whether to get roles from the JAAS Subject or not
-
getRoleClaim
-
setRoleClaim
-