public class JWTCallerPrincipal extends Object implements org.eclipse.microprofile.jwt.JsonWebToken
| Constructor and Description |
|---|
JWTCallerPrincipal(String jwt,
String type,
org.jose4j.jwt.JwtClaims claimsSet,
String name)
Create the DefaultJWTCallerPrincipal from the parsed JWT token and the extracted principal name
|
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<T> |
claim(String claimName) |
Set<String> |
getAudience() |
Object |
getClaim(String claimName) |
Set<String> |
getClaimNames() |
Set<String> |
getGroups() |
String |
getName() |
String |
getRawToken() |
boolean |
implies(Subject subject) |
String |
toString() |
String |
toString(boolean showAll)
TODO: showAll is ignored and currently assumed true
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic JWTCallerPrincipal(String jwt, String type, org.jose4j.jwt.JwtClaims claimsSet, 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 String getName()
public <T> Optional<T> claim(String claimName)
claim in interface org.eclipse.microprofile.jwt.JsonWebTokenpublic Set<String> getAudience()
getAudience in interface org.eclipse.microprofile.jwt.JsonWebTokenpublic Set<String> getGroups()
getGroups in interface org.eclipse.microprofile.jwt.JsonWebTokenpublic Set<String> getClaimNames()
getClaimNames in interface org.eclipse.microprofile.jwt.JsonWebTokenpublic String getRawToken()
getRawToken in interface org.eclipse.microprofile.jwt.JsonWebTokenpublic Object getClaim(String claimName)
getClaim in interface org.eclipse.microprofile.jwt.JsonWebTokenpublic String toString()
public 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.Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.