Enum KeyUse

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

public enum KeyUse extends Enum<KeyUse>
Represents the Possible KeyUse values.
  • Enum Constant Details

    • SIG

      public static final KeyUse SIG
      Use Key as a signature key.
    • ENC

      public static final KeyUse ENC
      Use Key as a encryption key.
  • Method Details

    • values

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

      public static KeyUse 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()
      Get the Value of the KeyUse.
      Returns:
      the KeyUse value.
    • getKeyUse

      public static KeyUse getKeyUse(String keyUse)
      Get the KeyUse.
      Parameters:
      keyUse - the string representing the KeyUse to get
      Returns:
      a KeyUse, or null if keyUse is null or empty
    • toString

      public String toString()
      Prints the KeyUse value.
      Overrides:
      toString in class Enum<KeyUse>
      Returns:
      the KeyUse in lowercase