Enum SignatureAlgorithm

java.lang.Object
java.lang.Enum<SignatureAlgorithm>
com.codename1.backend.security.oauth2.jose.jws.SignatureAlgorithm
All Implemented Interfaces:
JwsAlgorithm, Comparable<SignatureAlgorithm>

public enum SignatureAlgorithm extends Enum<SignatureAlgorithm> implements JwsAlgorithm
The public key algorithms: a token signed with a private key that anyone holding the public key can verify, and only the signer could have made.
  • Enum Constant Details

    • RS256

      public static final SignatureAlgorithm RS256
      RSASSA-PKCS1-v1_5 with SHA-256. What most identity providers sign with.
    • RS384

      public static final SignatureAlgorithm RS384
      RSASSA-PKCS1-v1_5 with SHA-384.
    • RS512

      public static final SignatureAlgorithm RS512
      RSASSA-PKCS1-v1_5 with SHA-512.
    • PS256

      public static final SignatureAlgorithm PS256
      RSASSA-PSS with SHA-256 and MGF1 over SHA-256.
    • ES256

      public static final SignatureAlgorithm ES256
      ECDSA on P-256 with SHA-256.
    • ES384

      public static final SignatureAlgorithm ES384
      ECDSA on P-384 with SHA-384.
  • Method Details

    • values

      public static SignatureAlgorithm[] 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 SignatureAlgorithm 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
    • getName

      public String getName()
      Description copied from interface: JwsAlgorithm
      The name as a token's alg header carries it: RS256.
      Specified by:
      getName in interface JwsAlgorithm
    • from

      public static SignatureAlgorithm from(String name)
      The algorithm of this name, or null when it is not one of these.