Interface Payload
- All Known Subinterfaces:
DecodedJWT
public interface Payload
The Payload class represents the 2nd part of the JWT, where the Payload value is held.
-
Method Summary
Modifier and TypeMethodDescriptionGet the value of the "aud" claim, or null if it's not available.Get a Claim given its name.Get the Claims defined in the Token.Get the value of the "exp" claim, or null if it's not available.default InstantGet the value of the "exp" claim as an Instant, or null if it's not available.getId()Get the value of the "jti" claim, or null if it's not available.Get the value of the "iat" claim, or null if it's not available.default InstantGet the value of the "iat" claim as an Instant, or null if it's not available.Get the value of the "iss" claim, or null if it's not available.Get the value of the "nbf" claim, or null if it's not available.default InstantGet the value of the "nbf" claim as an Instant, or null if it's not available.Get the value of the "sub" claim, or null if it's not available.
-
Method Details
-
getIssuer
String getIssuer()Get the value of the "iss" claim, or null if it's not available.- Returns:
- the Issuer value or null.
-
getSubject
String getSubject()Get the value of the "sub" claim, or null if it's not available.- Returns:
- the Subject value or null.
-
getAudience
-
getExpiresAt
Date getExpiresAt()Get the value of the "exp" claim, or null if it's not available.- Returns:
- the Expiration Time value or null.
-
getExpiresAtAsInstant
-
getNotBefore
Date getNotBefore()Get the value of the "nbf" claim, or null if it's not available.- Returns:
- the Not Before value or null.
-
getNotBeforeAsInstant
-
getIssuedAt
Date getIssuedAt()Get the value of the "iat" claim, or null if it's not available.- Returns:
- the Issued At value or null.
-
getIssuedAtAsInstant
-
getId
String getId()Get the value of the "jti" claim, or null if it's not available.- Returns:
- the JWT ID value or null.
-
getClaim
-
getClaims
-