Class PayloadImpl

  • All Implemented Interfaces:
    Payload

    class PayloadImpl
    extends java.lang.Object
    implements Payload
    The PayloadImpl class implements the Payload interface.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.String> audience  
      private java.util.Date expiresAt  
      private java.util.Date issuedAt  
      private java.lang.String issuer  
      private java.lang.String jwtId  
      private java.util.Date notBefore  
      private com.fasterxml.jackson.databind.ObjectReader objectReader  
      private java.lang.String subject  
      private java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> tree  
    • Constructor Summary

      Constructors 
      Constructor Description
      PayloadImpl​(java.lang.String issuer, java.lang.String subject, java.util.List<java.lang.String> audience, java.util.Date expiresAt, java.util.Date notBefore, java.util.Date issuedAt, java.lang.String jwtId, java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> tree, com.fasterxml.jackson.databind.ObjectReader objectReader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAudience()
      Get the value of the "aud" claim, or null if it's not available.
      Claim getClaim​(java.lang.String name)
      Get a Claim given it's name.
      java.util.Map<java.lang.String,​Claim> getClaims()
      Get the Claims defined in the Token.
      java.util.Date getExpiresAt()
      Get the value of the "exp" claim, or null if it's not available.
      java.lang.String getId()
      Get the value of the "jti" claim, or null if it's not available.
      java.util.Date getIssuedAt()
      Get the value of the "iat" claim, or null if it's not available.
      java.lang.String getIssuer()
      Get the value of the "iss" claim, or null if it's not available.
      java.util.Date getNotBefore()
      Get the value of the "nbf" claim, or null if it's not available.
      java.lang.String getSubject()
      Get the value of the "sub" claim, or null if it's not available.
      (package private) java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> getTree()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • issuer

        private final java.lang.String issuer
      • subject

        private final java.lang.String subject
      • audience

        private final java.util.List<java.lang.String> audience
      • expiresAt

        private final java.util.Date expiresAt
      • notBefore

        private final java.util.Date notBefore
      • issuedAt

        private final java.util.Date issuedAt
      • jwtId

        private final java.lang.String jwtId
      • tree

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

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

      • PayloadImpl

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

      • getTree

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

        public java.lang.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 java.lang.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 java.util.List<java.lang.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 java.util.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 java.util.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 java.util.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 java.lang.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​(java.lang.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 java.util.Map<java.lang.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.