Enum MacAlgorithm
- All Implemented Interfaces:
JwsAlgorithm, Comparable<MacAlgorithm>
The shared secret algorithms: whoever can verify a token can also make one,
so these suit a server checking tokens it issued itself and nothing wider.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic MacAlgorithmThe algorithm of this name, or null when it is not one of these.getName()The name as a token'salgheader carries it:RS256.static MacAlgorithmReturns the enum constant of this type with the specified name.static MacAlgorithm[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
HS256
HMAC with SHA-256. -
HS384
HMAC with SHA-384. -
HS512
HMAC with SHA-512.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getName
Description copied from interface:JwsAlgorithmThe name as a token'salgheader carries it:RS256.- Specified by:
getNamein interfaceJwsAlgorithm
-
from
The algorithm of this name, or null when it is not one of these.
-