Package org.forgerock.json.jose.jws
Enum Class JwsHeaderKey
- All Implemented Interfaces:
Serializable
,Comparable<JwsHeaderKey>
,java.lang.constant.Constable
An Enum for the JWS Header parameter names.
As described in the JWS specification, the reserved JWS header parameters are listed,
- "jku"
- "jwk"
- "x5u"
- "x5t"
- "x5c"
- "kid"
- "cty"
- "crit"
- 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
Enum ConstantDescriptionCritical header parameter.Content Type header parameter.Generic header key for a custom header parameter.JWK Set URL header parameter.JSON Web Key header parameter.Key ID header parameter.X.509 Certificate Chain header parameter.X.509 Certificate Thumbprint header parameter.X.509 URL header parameter. -
Method Summary
Modifier and TypeMethodDescriptionstatic JwsHeaderKey
getHeaderKey
(String headerKey) Gets the JwsHeaderKey constant that matches the given String.toString()
Turns the JwsHeaderKey constant into a lowercase String.value()
Returns a lowercase String of the JwsHeaderKey constant.static JwsHeaderKey
Returns the enum constant of this class with the specified name.static JwsHeaderKey[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JKU
JWK Set URL header parameter. -
JWK
JSON Web Key header parameter. -
X5U
X.509 URL header parameter. -
X5T
X.509 Certificate Thumbprint header parameter. -
X5C
X.509 Certificate Chain header parameter. -
KID
Key ID header parameter. -
CTY
Content Type header parameter. -
CRIT
Critical 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 JwsHeaderKey constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
-
getHeaderKey
Gets the JwsHeaderKey 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 JwsHeaderKey.- Returns:
- The matching JwsHeaderKey.
-
toString
Turns the JwsHeaderKey constant into a lowercase String.- Overrides:
toString
in classEnum<JwsHeaderKey>
- Returns:
- Lowercase String representation of the constant.
-