Enum Class KeyType

java.lang.Object
java.lang.Enum<KeyType>
io.fusionauth.jwt.domain.KeyType
All Implemented Interfaces:
Serializable, Comparable<KeyType>, java.lang.constant.Constable

public enum KeyType extends Enum<KeyType>
Available Cryptographic Algorithms for Keys as described in RFC 7518 Section 6.1.
  • ES Elliptic Curve [DDS]
  • RSA as defined by RFC 3447
  • oct: Octet Sequence (used to represent symmetric keys)

Currently only the RSA and EC Key Types is implemented and supported in this library.

Author:
Daniel DeGroff
  • Enum Constant Details

    • RSA

      public static final KeyType RSA
    • EC

      public static final KeyType EC
  • Method Details

    • values

      public static KeyType[] 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 KeyType 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
    • getKeyTypeFromOid

      public static KeyType getKeyTypeFromOid(String oid)