Package org.forgerock.json.jose.jwe
Enum Class JweHeaderKey
- All Implemented Interfaces:
Serializable
,Comparable<JweHeaderKey>
,Constable
An Enum for the additional JWE Header parameter names.
As described in the JWE specification, the reserved JWE header parameters are listed,
- "enc"
- "epk"
- "zip"
- "apu"
JwsHeaderKey
.
Any other header parameter name is deemed as a "custom" header parameter.- 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 JweHeaderKey
getHeaderKey
(String headerKey) Gets the JweHeaderKey constant that matches the given String.toString()
Turns the JweHeaderKey constant into a lowercase String.value()
Returns a lowercase String of the JweHeaderKey constant.static JweHeaderKey
Returns the enum constant of this class with the specified name.static JweHeaderKey[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENC
Encryption Method header parameter. -
EPK
Ephemeral Public Key header parameter. -
ZIP
Compression Algorithm header parameter. -
APU
Agreement PartyUInfo header parameter. -
APV
Agreement PartyVInfo header parameter. -
CUSTOM
Generic header key for a custom header parameter.- See Also:
-
-
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 JweHeaderKey constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
-
getHeaderKey
Gets the JweHeaderKey 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 JweHeaderKey.- Returns:
- The matching JweHeaderKey.
-
toString
Turns the JweHeaderKey constant into a lowercase String.- Overrides:
toString
in classEnum<JweHeaderKey>
- Returns:
- Lowercase String representation of the constant.
-