Enum Class KeyType

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

public enum KeyType extends Enum<KeyType>
Enum representing the possible KeyTypes.
  • Enum Constant Details

    • RSA

      public static final KeyType RSA
      RSA key.
    • EC

      public static final KeyType EC
      Elliptical Curve Key.
    • OCT

      public static final KeyType OCT
      Octet Key.
    • OKP

      public static final KeyType OKP
      Octet key-pair.
  • 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
    • value

      public String value()
      Get the value of the KeyType.
      Returns:
      the value of the KeyType
    • getRequiredFields

      public Set<String> getRequiredFields()
      The minimum set of fields that are required for a JWK of this type.
      Returns:
      the minimum set of fields for this type of JWK.
    • getKeyType

      public static KeyType getKeyType(String keyType)
      Get the KeyType given a string.
      Parameters:
      keyType - string representing the KeyType
      Returns:
      a KeyType or null if given null KeyType
    • toString

      public String toString()
      Gets the value of the KeyType.
      Overrides:
      toString in class Enum<KeyType>
      Returns:
      value of the KeyType