Enum Use

java.lang.Object
java.lang.Enum<Use>
io.jans.as.model.jwk.Use
All Implemented Interfaces:
Serializable, Comparable<Use>, java.lang.constant.Constable

public enum Use extends Enum<Use>
Version:
September 30, 2021
Author:
Javier Rojas Blum
  • Enum Constant Details

    • SIGNATURE

      public static final Use SIGNATURE
      Use this constant when the key is being used for signature.
    • ENCRYPTION

      public static final Use ENCRYPTION
      Use this constant when the key is being used for encryption.
  • Method Details

    • values

      public static Use[] 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 Use 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
    • getParamName

      public String getParamName()
    • fromString

      public static Use fromString(String param)
      Returns the corresponding Use for a parameter use of the JWK endpoint.
      Parameters:
      param - The use parameter.
      Returns:
      The corresponding use if found, otherwise null.
    • toString

      public String toString()
      Returns a string representation of the object. In this case the parameter name.
      Overrides:
      toString in class Enum<Use>
      Returns:
      The string representation of the object.