Package io.smallrye.jwt.auth.principal
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
A default implementation of JWTCallerPrincipal that wraps the jose4j
JwtClaims.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJWTCallerPrincipal(String rawToken, String tokenType, org.jose4j.jwt.JwtClaims claimsSet) Create the DefaultJWTCallerPrincipal from the parsed JWT token and the extracted principal nameDefaultJWTCallerPrincipal(String tokenType, org.jose4j.jwt.JwtClaims claimsSet) DefaultJWTCallerPrincipal(org.jose4j.jwt.JwtClaims claimsSet) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<String> filterCustomClaimNames(Collection<String> claimNames) Determine the custom claims in the setprotected ObjectgetClaimValue(String claimName) protected static StringgetRawToken(org.jose4j.jwt.JwtClaims claimsSet) protected voidMethods inherited from class io.smallrye.jwt.auth.principal.JWTCallerPrincipal
getClaim, getClaimNames, getClaimType, getName, implies, toString, toString, wrapClaimValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.microprofile.jwt.JsonWebToken
claim, claim, containsClaim, getClaim, getExpirationTime, getIssuedAtTime, getIssuer, getRawToken, getSubject, getTokenID
-
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 valuetokenType- - token typeclaimsSet- - Jose4J claims set
-
DefaultJWTCallerPrincipal
-
DefaultJWTCallerPrincipal
public DefaultJWTCallerPrincipal(org.jose4j.jwt.JwtClaims claimsSet)
-
-
Method Details
-
getRawToken
-
getAudience
-
getGroups
-
doGetClaimNames
- Specified by:
doGetClaimNamesin classJWTCallerPrincipal
-
getClaimValue
- Specified by:
getClaimValuein classJWTCallerPrincipal
-
filterCustomClaimNames
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
-