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
public class DefaultJWTRoleParser extends DefaultSubjectRoleParser implements JWTRoleParser
A default implementation to extract roles from a JWT token
-
-
Constructor Summary
Constructors Constructor Description DefaultJWTRoleParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRoleClaim()booleanisUseJaasSubject()Set<Principal>parseRolesFromToken(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, setRoleClassifierType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cxf.sts.token.validator.SubjectRoleParser
parseRolesFromSubject
-
-
-
-
Method Detail
-
parseRolesFromToken
public Set<Principal> parseRolesFromToken(Principal principal, Subject subject, JwtToken token)
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
public String getRoleClaim()
-
setRoleClaim
public void setRoleClaim(String roleClaim)
-
-