public interface Claims
extends java.util.Map<java.lang.String,java.lang.Object>
Claims
interface represents JSON Web Token (JWT) payload claims and offers convenient get methods for some of the
well known JWT claims such as "iss", "exp", and "iat".Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUDIENCE
The AUDIENCE is used to represent the "aud" claim
|
static java.lang.String |
AZP
The AZP is used to represent the "azp" claim
|
static java.lang.String |
EXPIRATION
The EXPIRATION is used to represent the "exp" claim
|
static java.lang.String |
ID
The ID is used to represent the "jti" claim
|
static java.lang.String |
ISSUED_AT
The ISSUED_AT is used to represent the "iat" claim
|
static java.lang.String |
ISSUER
The ISSUER is used to represent the "iss" claim
|
static java.lang.String |
NOT_BEFORE
The NOT_BEFORE is used to represent the "nbf" claim
|
static java.lang.String |
SUBJECT
The SUBJECT is used to represent the "sub" claim
|
static java.lang.String |
TOKEN_TYPE
The TOKEN_TYPE is used to represent the "token_type" claim
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAllClaims() |
java.util.List<java.lang.String> |
getAudience() |
java.lang.String |
getAuthorizedParty() |
<T> T |
getClaim(java.lang.String claimName,
java.lang.Class<T> requiredType) |
long |
getExpiration() |
long |
getIssuedAt() |
java.lang.String |
getIssuer() |
java.lang.String |
getJwtId() |
long |
getNotBefore() |
java.lang.String |
getSubject() |
java.lang.String |
toJsonString() |
static final java.lang.String ISSUER
static final java.lang.String SUBJECT
static final java.lang.String AUDIENCE
static final java.lang.String EXPIRATION
static final java.lang.String NOT_BEFORE
static final java.lang.String ISSUED_AT
static final java.lang.String ID
static final java.lang.String AZP
static final java.lang.String TOKEN_TYPE
java.lang.String getIssuer()
java.lang.String getSubject()
java.util.List<java.lang.String> getAudience()
long getExpiration()
long getNotBefore()
long getIssuedAt()
java.lang.String getJwtId()
java.lang.String getAuthorizedParty()
<T> T getClaim(java.lang.String claimName, java.lang.Class<T> requiredType)
claimName
- claim namerequiredType
- This is the required type of the claim valuejava.util.Map<java.lang.String,java.lang.Object> getAllClaims()
java.lang.String toJsonString()