public class DefaultJWTCallerPrincipal extends JWTCallerPrincipal
Constructor and Description |
---|
DefaultJWTCallerPrincipal(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 |
---|---|
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 |
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
|
claim, getName
public DefaultJWTCallerPrincipal(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.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)
toString
in class JWTCallerPrincipal
showAll
- - should all claims associated with the JWT be displayed or should only those defined in the
JsonWebToken interface be displayed.