public interface JsonWebToken extends Principal
Principal
api.Modifier and Type | Method and Description |
---|---|
default <T> Optional<T> |
claim(String claimName)
A utility method to access a claim value in an Optional
wrapper
|
default boolean |
containsClaim(String claimName)
Verify is a given claim exists
|
default Set<String> |
getAudience()
The aud(Audience) claim identifies the recipients that the JWT is
intended for.
|
<T> T |
getClaim(String claimName)
Access the value of the indicated claim.
|
Set<String> |
getClaimNames()
Access the names of all claims are associated with this token.
|
default long |
getExpirationTime()
The exp (Expiration time) claim identifies the expiration time on or
after which the JWT MUST NOT be accepted
for processing in seconds since 1970-01-01T00:00:00Z UTC
|
default Set<String> |
getGroups()
The groups claim provides the group names the JWT principal has been
granted.
|
default long |
getIssuedAtTime()
The iat(Issued at time) claim identifies the time at which the JWT was
issued in seconds since 1970-01-01T00:00:00Z UTC
|
default String |
getIssuer()
The iss(Issuer) claim identifies the principal that issued the JWT
|
String |
getName()
Returns the unique name of this principal.
|
default String |
getRawToken()
Get the raw bearer token string originally passed in the authentication
header
|
default String |
getSubject()
The sub(Subject) claim identifies the principal that is the subject of
the JWT.
|
default String |
getTokenID()
The jti(JWT ID) claim provides a unique identifier for the JWT.
|
String getName()
default String getRawToken()
default String getIssuer()
default Set<String> getAudience()
default String getSubject()
default String getTokenID()
default long getExpirationTime()
default long getIssuedAtTime()
default Set<String> getGroups()
Set<String> getClaimNames()
default boolean containsClaim(String claimName)
claimName
- - the name of the claim<T> T getClaim(String claimName)
claimName
- - the name of the claimCopyright © 2018 Eclipse Foundation. All rights reserved.