Package org.forgerock.json.jose.jwt
Enum Class JwtHeaderKey
- All Implemented Interfaces:
Serializable
,Comparable<JwtHeaderKey>
,Constable
An Enum for the JWT Header parameter names.
As described in the JWT specification, the reserved JWT header parameters are listed,
- "typ"
- "alg"
- Since:
- 2.0.0
-
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 TypeMethodDescriptionstatic JwtHeaderKey
getHeaderKey
(String headerKey) Gets the JwtHeaderKey constant that matches the given String.toString()
Turns the JwtHeaderKey constant into a lowercase String.value()
Returns a lowercase String of the JwtHeaderKey constant.static JwtHeaderKey
Returns the enum constant of this class with the specified name.static JwtHeaderKey[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TYP
Type JWT header parameter.. -
ALG
Algorithm JWT header parameter. -
CUSTOM
Generic header key for a custom header parameter.
-
-
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
-
value
Returns a lowercase String of the JwtHeaderKey constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
-
getHeaderKey
Gets the JwtHeaderKey constant that matches the given String.If the given String does not match any of the constants, then CUSTOM is returned.
- Parameters:
headerKey
- The String representation of a JwtHeaderKey.- Returns:
- The matching JwtHeaderKey.
-
toString
Turns the JwtHeaderKey constant into a lowercase String.- Overrides:
toString
in classEnum<JwtHeaderKey>
- Returns:
- Lowercase String representation of the constant.
-