Package org.forgerock.json.jose.jws
Enum JwsHeaderKey
- java.lang.Object
-
- java.lang.Enum<JwsHeaderKey>
-
- org.forgerock.json.jose.jws.JwsHeaderKey
-
- All Implemented Interfaces:
Serializable
,Comparable<JwsHeaderKey>
public enum JwsHeaderKey extends Enum<JwsHeaderKey>
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CRIT
Critical header parameter.CTY
Content Type header parameter.CUSTOM
Generic header key for a custom header parameter.JKU
JWK Set URL header parameter.JWK
JSON Web Key header parameter.KID
Key ID header parameter.X5C
X.509 Certificate Chain header parameter.X5T
X.509 Certificate Thumbprint header parameter.X5U
X.509 URL header parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwsHeaderKey
getHeaderKey(String headerKey)
Gets the JwsHeaderKey constant that matches the given String.String
toString()
Turns the JwsHeaderKey constant into a lowercase String.String
value()
Returns a lowercase String of the JwsHeaderKey constant.static JwsHeaderKey
valueOf(String name)
Returns the enum constant of this type with the specified name.static JwsHeaderKey[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JKU
public static final JwsHeaderKey JKU
JWK Set URL header parameter.
-
JWK
public static final JwsHeaderKey JWK
JSON Web Key header parameter.
-
X5U
public static final JwsHeaderKey X5U
X.509 URL header parameter.
-
X5T
public static final JwsHeaderKey X5T
X.509 Certificate Thumbprint header parameter.
-
X5C
public static final JwsHeaderKey X5C
X.509 Certificate Chain header parameter.
-
KID
public static final JwsHeaderKey KID
Key ID header parameter.
-
CTY
public static final JwsHeaderKey CTY
Content Type header parameter.
-
CRIT
public static final JwsHeaderKey CRIT
Critical header parameter.
-
CUSTOM
public static final JwsHeaderKey CUSTOM
Generic header key for a custom header parameter.- See Also:
- Private Header Parameter Names
-
-
Method Detail
-
values
public static JwsHeaderKey[] 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 (JwsHeaderKey c : JwsHeaderKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JwsHeaderKey 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 JwsHeaderKey constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
toString()
-
getHeaderKey
public static JwsHeaderKey getHeaderKey(String headerKey)
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
public String toString()
Turns the JwsHeaderKey constant into a lowercase String.- Overrides:
toString
in classEnum<JwsHeaderKey>
- Returns:
- Lowercase String representation of the constant.
-
-