Class PayloadImpl

java.lang.Object
com.auth0.jwt.impl.PayloadImpl
All Implemented Interfaces:
Payload

class PayloadImpl extends Object implements Payload
The PayloadImpl class implements the Payload interface.
  • Field Details

    • issuer

      private final String issuer
    • subject

      private final String subject
    • audience

      private final List<String> audience
    • expiresAt

      private final Date expiresAt
    • notBefore

      private final Date notBefore
    • issuedAt

      private final Date issuedAt
    • jwtId

      private final String jwtId
    • tree

      private final Map<String,com.fasterxml.jackson.databind.JsonNode> tree
    • objectReader

      private final com.fasterxml.jackson.databind.ObjectReader objectReader
  • Constructor Details

    • PayloadImpl

      PayloadImpl(String issuer, String subject, List<String> audience, Date expiresAt, Date notBefore, Date issuedAt, String jwtId, Map<String,com.fasterxml.jackson.databind.JsonNode> tree, com.fasterxml.jackson.databind.ObjectReader objectReader)
  • Method Details

    • getTree

      Map<String,com.fasterxml.jackson.databind.JsonNode> getTree()
    • getIssuer

      public String getIssuer()
      Description copied from interface: Payload
      Get the value of the "iss" claim, or null if it's not available.
      Specified by:
      getIssuer in interface Payload
      Returns:
      the Issuer value or null.
    • getSubject

      public String getSubject()
      Description copied from interface: Payload
      Get the value of the "sub" claim, or null if it's not available.
      Specified by:
      getSubject in interface Payload
      Returns:
      the Subject value or null.
    • getAudience

      public List<String> getAudience()
      Description copied from interface: Payload
      Get the value of the "aud" claim, or null if it's not available.
      Specified by:
      getAudience in interface Payload
      Returns:
      the Audience value or null.
    • getExpiresAt

      public Date getExpiresAt()
      Description copied from interface: Payload
      Get the value of the "exp" claim, or null if it's not available.
      Specified by:
      getExpiresAt in interface Payload
      Returns:
      the Expiration Time value or null.
    • getNotBefore

      public Date getNotBefore()
      Description copied from interface: Payload
      Get the value of the "nbf" claim, or null if it's not available.
      Specified by:
      getNotBefore in interface Payload
      Returns:
      the Not Before value or null.
    • getIssuedAt

      public Date getIssuedAt()
      Description copied from interface: Payload
      Get the value of the "iat" claim, or null if it's not available.
      Specified by:
      getIssuedAt in interface Payload
      Returns:
      the Issued At value or null.
    • getId

      public String getId()
      Description copied from interface: Payload
      Get the value of the "jti" claim, or null if it's not available.
      Specified by:
      getId in interface Payload
      Returns:
      the JWT ID value or null.
    • getClaim

      public Claim getClaim(String name)
      Description copied from interface: Payload
      Get a Claim given it's name. If the Claim wasn't specified in the Payload, a NullClaim will be returned.
      Specified by:
      getClaim in interface Payload
      Parameters:
      name - the name of the Claim to retrieve.
      Returns:
      a non-null Claim.
    • getClaims

      public Map<String,Claim> getClaims()
      Description copied from interface: Payload
      Get the Claims defined in the Token.
      Specified by:
      getClaims in interface Payload
      Returns:
      a non-null Map containing the Claims defined in the Token.