public enum JwtType extends Enum<JwtType>
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.
Enum Constant and Description |
---|
JWE
Used when encrypting a nested JWT.
|
JWS
Used when signing a nested JWT.
|
JWT
Used for plaintext, non-nested signed or non-nested encrypted JWTs.
|
Modifier and Type | Method and 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.
|
public static final JwtType JWT
public static final JwtType JWS
public static final JwtType JWE
public static JwtType[] values()
for (JwtType c : JwtType.values()) System.out.println(c);
public static JwtType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright 2010-2018 ForgeRock AS.