Enum Class JwsAlgorithm

java.lang.Object
java.lang.Enum<JwsAlgorithm>
com.mastercard.developer.oauth2.internal.jose.JwsAlgorithm
All Implemented Interfaces:
Serializable, Comparable<JwsAlgorithm>, Constable

public enum JwsAlgorithm extends Enum<JwsAlgorithm>
Represents signing algorithms supported for JWT signing. See also: 5.4. Cryptography and secrets
  • Enum Constant Details

  • Method Details

    • values

      public static JwsAlgorithm[] 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 JwsAlgorithm 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
    • alg

      public String alg()
      Returns the algorithm name as used in JWT headers.
    • fromKey

      public static JwsAlgorithm fromKey(Key key)
      Determines the appropriate signing algorithm based on the key type.