Interface Payload

  • All Known Subinterfaces:
    DecodedJWT

    public interface Payload
    The Payload class represents the 2nd part of the JWT, where the Payload value is hold.
    • Method Detail

      • 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

        List<String> getAudience()
        Get the value of the "aud" claim, or null if it's not available.
        Returns:
        the Audience value or null.
      • getExpiresAt

        Date getExpiresAt()
        Get the value of the "exp" claim, or null if it's not available.
        Returns:
        the Expiration Time value or null.
      • getNotBefore

        Date getNotBefore()
        Get the value of the "nbf" claim, or null if it's not available.
        Returns:
        the Not Before value or null.
      • getIssuedAt

        Date getIssuedAt()
        Get the value of the "iat" claim, or null if it's not available.
        Returns:
        the Issued At value or null.
      • 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

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

        Map<String,​Claim> getClaims()
        Get the Claims defined in the Token.
        Returns:
        a non-null Map containing the Claims defined in the Token.