Package org.forgerock.json.jose.jwe
Enum JweHeaderKey
- java.lang.Object
-
- java.lang.Enum<JweHeaderKey>
-
- org.forgerock.json.jose.jwe.JweHeaderKey
-
- All Implemented Interfaces:
Serializable
,Comparable<JweHeaderKey>
public enum JweHeaderKey extends Enum<JweHeaderKey>
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APU
Agreement PartyUInfo header parameter.APV
Agreement PartyVInfo header parameter.CUSTOM
Generic header key for a custom header parameter.ENC
Encryption Method header parameter.EPK
Ephemeral Public Key header parameter.ZIP
Compression Algorithm header parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JweHeaderKey
getHeaderKey(String headerKey)
Gets the JweHeaderKey constant that matches the given String.String
toString()
Turns the JweHeaderKey constant into a lowercase String.String
value()
Returns a lowercase String of the JweHeaderKey constant.static JweHeaderKey
valueOf(String name)
Returns the enum constant of this type with the specified name.static JweHeaderKey[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENC
public static final JweHeaderKey ENC
Encryption Method header parameter.
-
EPK
public static final JweHeaderKey EPK
Ephemeral Public Key header parameter.
-
ZIP
public static final JweHeaderKey ZIP
Compression Algorithm header parameter.
-
APU
public static final JweHeaderKey APU
Agreement PartyUInfo header parameter.
-
APV
public static final JweHeaderKey APV
Agreement PartyVInfo header parameter.
-
CUSTOM
public static final JweHeaderKey CUSTOM
Generic header key for a custom header parameter.- See Also:
- Private Header Parameter Names
-
-
Method Detail
-
values
public static JweHeaderKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JweHeaderKey c : JweHeaderKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JweHeaderKey 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 nameNullPointerException
- if the argument is null
-
value
public String value()
Returns a lowercase String of the JweHeaderKey constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
toString()
-
getHeaderKey
public static JweHeaderKey getHeaderKey(String headerKey)
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
public String toString()
Turns the JweHeaderKey constant into a lowercase String.- Overrides:
toString
in classEnum<JweHeaderKey>
- Returns:
- Lowercase String representation of the constant.
-
-