Enum Class JwtClaimsSetKey

java.lang.Object
java.lang.Enum<JwtClaimsSetKey>
org.forgerock.json.jose.jwt.JwtClaimsSetKey
All Implemented Interfaces:
Serializable, Comparable<JwtClaimsSetKey>, Constable

public enum JwtClaimsSetKey extends Enum<JwtClaimsSetKey>
An Enum for the JWT Claims Set names.

As described in the JWT specification, this Enum class represents all the reserved JWT Claim Names, any other Claim name is deemed as a "custom" Claim name.

Since:
2.0.0
See Also:
  • Enum Constant Details

    • 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 Details

    • values

      public static JwtClaimsSetKey[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JwtClaimsSetKey valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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:
    • 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.
    • toString

      public String toString()
      Turns the JwtClaimsSetKey constant into a lowercase String.
      Overrides:
      toString in class Enum<JwtClaimsSetKey>
      Returns: