Package org.forgerock.json.jose.jws
Enum Class JwsAlgorithmType
- All Implemented Interfaces:
Serializable
,Comparable<JwsAlgorithmType>
,Constable
An Enum of the possible types of JWS algorithms that can be used to sign a JWT.
- Since:
- 2.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether the algorithm type is a symmetric (secret key) algorithm like HMAC or a public key algorithm.toString()
Turns the JwsAlgorithmType constant into a JSON value string.static JwsAlgorithmType
Returns the enum constant of this class with the specified name.static JwsAlgorithmType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Deprecated.This algorithm is inherently insecure and shouldn't be used.No digital signature or MAC value included. -
HMAC
HMAC signing algorithm. -
RSA
RSA signing algorithm. -
ECDSA
Elliptic Curve DSA signing algorithm. -
EDDSA
Edwards Curve DSA signing algorithm. See RFC 8037.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isSymmetric
public boolean isSymmetric()Indicates whether the algorithm type is a symmetric (secret key) algorithm like HMAC or a public key algorithm. Note: the special valueNONE
is treated as a symmetric algorithm by this method, but it doesn't use a key at all.- Returns:
true
if the algorithm type uses a shared secret key for signing and verification orfalse
if it uses distinct private and public keys for these operations.
-
toString
Turns the JwsAlgorithmType constant into a JSON value string.- Overrides:
toString
in classEnum<JwsAlgorithmType>
- Returns:
-