Class DefaultJWTRoleParser

    • Constructor Detail

      • DefaultJWTRoleParser

        public DefaultJWTRoleParser()
    • 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:
        parseRolesFromToken in interface JWTRoleParser
        Parameters:
        principal - the Principal associated with the token
        subject - the JAAS Subject associated with a successful validation of the token
        token - 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)