Package org.forgerock.secrets.jwkset
Enum JwkKeyFormat
- java.lang.Object
-
- java.lang.Enum<JwkKeyFormat>
-
- org.forgerock.secrets.jwkset.JwkKeyFormat
-
- All Implemented Interfaces:
Serializable
,Comparable<JwkKeyFormat>
,KeyFormat<JWK>
public enum JwkKeyFormat extends Enum<JwkKeyFormat> implements KeyFormat<JWK>
Exports keys in JSON Web Key (JWK) format.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description USING_KEY_OPS
A JWK format that only includes the key_ops parameter to express the key's usage.USING_USE
A JWK format that only includes the use parameter to express the key's usage.USING_USE_AND_KEY_OPS
A JWK format that includes both the use and key_ops parameters to express the key's usage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JWK
export(CryptoKey key, Key rawKey)
Exports the given crypto key and raw key material.static JwkKeyFormat
valueOf(String name)
Returns the enum constant of this type with the specified name.static JwkKeyFormat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
USING_USE
public static final JwkKeyFormat USING_USE
A JWK format that only includes the use parameter to express the key's usage.
-
USING_KEY_OPS
public static final JwkKeyFormat USING_KEY_OPS
A JWK format that only includes the key_ops parameter to express the key's usage.
-
USING_USE_AND_KEY_OPS
public static final JwkKeyFormat USING_USE_AND_KEY_OPS
A JWK format that includes both the use and key_ops parameters to express the key's usage.
-
-
Method Detail
-
values
public static JwkKeyFormat[] 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 (JwkKeyFormat c : JwkKeyFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JwkKeyFormat 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
-
-