Package org.forgerock.json.jose.jwt
Enum JwtType
- java.lang.Object
-
- java.lang.Enum<JwtType>
-
- org.forgerock.json.jose.jwt.JwtType
-
- All Implemented Interfaces:
Serializable
,Comparable<JwtType>
public enum JwtType extends Enum<JwtType>
An Enum for the possible types of JWTs.There are only three possible types of JWTs, plaintext, signed or encrypted. For non-nested JWTs then the "JWT" type is RECOMMENDED to be used but it is OPTIONAL to set the "typ" property in the JWT header. For nested signed or encrypted JWTs the JWT type MUST be "JWS" and "JWE" respectively and the "typ" property in the JWT header MUST be set.
- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JwtType
jwtType(String jwtType)
Finds the value of the String representation of the given JWT type.static JwtType
valueOf(String name)
Returns the enum constant of this type with the specified name.static JwtType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static JwtType[] 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 (JwtType c : JwtType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JwtType 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
-
-