Class DefaultJWTCallerPrincipal

java.lang.Object
io.smallrye.jwt.auth.principal.JWTCallerPrincipal
io.smallrye.jwt.auth.principal.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 Details

    • 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 Details

    • getRawToken

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

      public Set<String> getAudience()
    • getGroups

      public Set<String> getGroups()
    • doGetClaimNames

      protected Collection<String> doGetClaimNames()
      Specified by:
      doGetClaimNames in class JWTCallerPrincipal
    • getClaimValue

      protected Object getClaimValue(String claimName)
      Specified by:
      getClaimValue in class JWTCallerPrincipal
    • 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)