public class JWTCallerPrincipal
extends java.lang.Object
Constructor and Description |
---|
JWTCallerPrincipal(java.lang.String jwt,
java.lang.String type,
JwtClaims claimsSet,
java.lang.String name)
Create the DefaultJWTCallerPrincipal from the parsed JWT token and the extracted principal name
|
Modifier and Type | Method and Description |
---|---|
<T> java.util.Optional<T> |
claim(java.lang.String claimName) |
java.util.Set<java.lang.String> |
getAudience() |
java.lang.Object |
getClaim(java.lang.String claimName) |
java.util.Set<java.lang.String> |
getClaimNames() |
java.util.Set<java.lang.String> |
getGroups() |
java.lang.String |
getName() |
java.lang.String |
getRawToken() |
boolean |
implies(javax.security.auth.Subject subject) |
java.lang.String |
toString() |
java.lang.String |
toString(boolean showAll)
TODO: showAll is ignored and currently assumed true
|
public JWTCallerPrincipal(java.lang.String jwt, java.lang.String type, JwtClaims claimsSet, java.lang.String name)
jwt
- - the parsed JWT token representationname
- - the extracted unqiue name to use as the principal name; from "upn", "preferred_username" or "sub" claimpublic java.lang.String getName()
public <T> java.util.Optional<T> claim(java.lang.String claimName)
public java.util.Set<java.lang.String> getAudience()
public java.util.Set<java.lang.String> getGroups()
public java.util.Set<java.lang.String> getClaimNames()
public java.lang.String getRawToken()
public java.lang.Object getClaim(java.lang.String claimName)
public boolean implies(javax.security.auth.Subject subject)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean showAll)
showAll
- - should all claims associated with the JWT be displayed or should only those defined in the
JsonWebToken interface be displayed.