Class DefaultJWTCallerPrincipal

  • All Implemented Interfaces:
    Principal, org.eclipse.microprofile.jwt.JsonWebToken

    public class DefaultJWTCallerPrincipal
    extends JWTCallerPrincipal
    A default implementation of JWTCallerPrincipal that wraps the jose4j JwtClaims.
    See Also:
    JwtClaims
    • Constructor Detail

      • DefaultJWTCallerPrincipal

        public DefaultJWTCallerPrincipal​(String rawToken,
                                         String tokenType,
                                         org.jose4j.jwt.JwtClaims claimsSet)
        Create the DefaultJWTCallerPrincipal from the parsed JWT token and the extracted principal name
        Parameters:
        rawToken - - raw token value
        tokenType - - token type
        claimsSet - - Jose4J claims set
      • DefaultJWTCallerPrincipal

        public DefaultJWTCallerPrincipal​(String tokenType,
                                         org.jose4j.jwt.JwtClaims claimsSet)
      • DefaultJWTCallerPrincipal

        public DefaultJWTCallerPrincipal​(org.jose4j.jwt.JwtClaims claimsSet)
    • Method Detail

      • getRawToken

        protected static String getRawToken​(org.jose4j.jwt.JwtClaims claimsSet)
      • getAudience

        public Set<String> getAudience()
      • filterCustomClaimNames

        protected Set<String> filterCustomClaimNames​(Collection<String> claimNames)
        Determine the custom claims in the set
        Parameters:
        claimNames - - the current set of claim names in this token
        Returns:
        the possibly empty set of names for non-Claims claims
      • replaceClaimValueWithJsonValue

        protected void replaceClaimValueWithJsonValue​(String name)