Enum Class JwtType

java.lang.Object
java.lang.Enum<JwtType>
com.revetsec.jose.JwtType
All Implemented Interfaces:
Serializable, Comparable<JwtType>, Constable

@Immutable public enum JwtType extends Enum<JwtType>
A supported JWT protected-header typ value used when signing a token. The token type describes its intended use; it is separate from the claims and signing algorithm.

This enum is not switch-stable: a later release may add constants, so a switch over it needs a default branch.

Since:
1.0.0
Author:
Mark Allen
  • Enum Constant Details

    • JWT

      public static final JwtType JWT
      A general-purpose JWT (JWT).
    • ACCESS_TOKEN

      public static final JwtType ACCESS_TOKEN
      A JWT access token (at+jwt).
    • CLIENT_AUTHENTICATION

      public static final JwtType CLIENT_AUTHENTICATION
      A JWT client authentication assertion (client-authentication+jwt).
  • Method Details

    • values

      public static JwtType[] 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 JwtType 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
    • getWireValue

      Returns this type's exact protected-header typ value.
      Returns:
      the wire value
      Since:
      1.0.0