Enum JwtClaimsSetKey

    • Enum Constant Detail

      • TYP

        public static final JwtClaimsSetKey TYP
        Type Claim.

        Used to declare a type for the contents of this JWT Claims Set.

        The values used for the "typ" claim SHOULD come from the same value space as the "typ" header parameter, with the same rules applying.

      • JTI

        public static final JwtClaimsSetKey JTI
        JWT ID Claim.

        Provides a unique identifier for the JWT.

      • ISS

        public static final JwtClaimsSetKey ISS
        Issuer Claim.

        Identifies the principal that issued the JWT.

      • SUB

        public static final JwtClaimsSetKey SUB
        Subject Claim.

        Identifies the subject of the JWT.

      • AUD

        public static final JwtClaimsSetKey AUD
        Audience Claim.

        Identifies the audience that the JWT is intended for.

      • IAT

        public static final JwtClaimsSetKey IAT
        Issued At Claim.

        Identifies the time at which the JWT was issued. This claim can be used to determine the age of the token.

      • NBF

        public static final JwtClaimsSetKey NBF
        Not Before Claim.

        Identifies the time before which the token MUST NOT be accepted for processing.

      • EXP

        public static final JwtClaimsSetKey EXP
        Expiration Time Claim.

        Identifies the expiration time on or after which the token MUST NOT be accepted for processing.

      • CUSTOM

        public static final JwtClaimsSetKey CUSTOM
        Custom (private) Claim.

        Represents any claim not registered in the JWT spec.

    • Method Detail

      • values

        public static JwtClaimsSetKey[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JwtClaimsSetKey c : JwtClaimsSetKey.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JwtClaimsSetKey valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • value

        public String value()
        Returns a lowercase String of the JwtClaimsSetKey constant.
        Returns:
        Lowercase String representation of the constant.
        See Also:
        toString()
      • getClaimSetKey

        public static JwtClaimsSetKey getClaimSetKey​(String claimSetKey)
        Gets the JwtClaimsSetKey constant that matches the given String (case-insensitive).
        Parameters:
        claimSetKey - The case-insensitive String representation of a JwtClaimsSetKey.
        Returns:
        The matching JwtClaimsSetKey or CUSTOM for keys not in the JWT spec.