Class JwtClaims


  • public class JwtClaims
    extends JwtClaimSet
    Author:
    Javier Rojas Blum Date: 11.09.2012
    • Constructor Detail

      • JwtClaims

        public JwtClaims()
      • JwtClaims

        public JwtClaims​(org.json.JSONObject jsonObject)
    • Method Detail

      • setExpirationTime

        public void setExpirationTime​(java.util.Date expirationTime)
        Identifies the expiration time on or after which the token MUST NOT be accepted for processing.
        Parameters:
        expirationTime - The expiration time.
      • setNotBefore

        public void setNotBefore​(java.util.Date notBefore)
        Identifies the time before which the token MUST NOT be accepted for processing. The processing of the "nbf" claim requires that the current date/time MUST be after or equal to the not-before date/time listed in the "nbf" claim.
        Parameters:
        notBefore - The not-before date.
      • setIssuedAt

        public void setIssuedAt​(java.util.Date issuedAt)
        Identifies the time at which the JWT was issued. This claim can be used to determine the age of the token.
        Parameters:
        issuedAt - The issue date.
      • setIssuer

        public void setIssuer​(java.lang.String issuer)
        Identifies the principal that issued the JWT.
        Parameters:
        issuer - The issuer of the JWT.
      • setIssuer

        public void setIssuer​(java.net.URI issuer)
        Identifies the principal that issued the JWT.
        Parameters:
        issuer - The issuer of the JWT.
      • addAudience

        public void addAudience​(java.lang.String audience)
      • setAudience

        public void setAudience​(java.lang.String audience)
        Identifies the audience that the JWT is intended for. The principal intended to process the JWT MUST be identified with the value of the audience claim. If the principal processing the claim does not identify itself with the identifier in the "aud" claim value then the JWT MUST be rejected.
        Parameters:
        audience - The audience of the JWT.
      • setAudience

        public void setAudience​(java.net.URI audience)
        Identifies the audience that the JWT is intended for. The principal intended to process the JWT MUST be identified with the value of the audience claim. If the principal processing the claim does not identify itself with the identifier in the "aud" claim value then the JWT MUST be rejected.
        Parameters:
        audience - The audience of the JWT.
      • setSubjectIdentifier

        public void setSubjectIdentifier​(java.lang.String subjectIdentifier)
        Identifies the subject of the JWT.
        Parameters:
        subjectIdentifier - The subject of the JWT.
      • setSubjectIdentifier

        public void setSubjectIdentifier​(java.net.URI subjectIdentifier)
        Identifies the subject of the JWT.
        Parameters:
        subjectIdentifier - The subject of the JWT.
      • setJwtId

        public void setJwtId​(java.lang.String jwtId)
        Provides a unique identifier for the JWT.
        Parameters:
        jwtId - Unique identifier for the JWT.
      • setJwtId

        public void setJwtId​(java.util.UUID jwtId)
        Provides a unique identifier for the JWT.
        Parameters:
        jwtId - Unique identifier for the JWT.
      • setType

        public void setType​(JwtType type)
        Declare a type for the contents of this JWT Claims Set.
        Parameters:
        type - The type of the JWT claims set.