Enum JwtClaimsSetKey
- java.lang.Object
-
- java.lang.Enum<JwtClaimsSetKey>
-
- org.forgerock.json.jose.jwt.JwtClaimsSetKey
-
- All Implemented Interfaces:
Serializable
,Comparable<JwtClaimsSetKey>
public enum JwtClaimsSetKey extends Enum<JwtClaimsSetKey>
An Enum for the JWT Claims Set names.As described in the JWT specification, this Enum class represents all the reserved JWT Claim Names, any other Claim name is deemed as a "custom" Claim name.
- Since:
- 2.0.0
- See Also:
- Reserved Claim Names
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwtClaimsSetKey
getClaimSetKey(String claimSetKey)
Gets theJwtClaimsSetKey
constant that matches the givenString
(case-insensitive).String
toString()
Turns theJwtClaimsSetKey
constant into a lowercaseString
.String
value()
Returns a lowercase String of theJwtClaimsSetKey
constant.static JwtClaimsSetKey
valueOf(String name)
Returns the enum constant of this type with the specified name.static JwtClaimsSetKey[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TYP
public static final JwtClaimsSetKey TYP
Type Claim.Used to declare a type for the contents of this JWT Claims Set.
The values used for the "typ" claim SHOULD come from the same value space as the "typ" header parameter, with the same rules applying.
-
JTI
public static final JwtClaimsSetKey JTI
JWT ID Claim.Provides a unique identifier for the JWT.
-
ISS
public static final JwtClaimsSetKey ISS
Issuer Claim.Identifies the principal that issued the JWT.
-
SUB
public static final JwtClaimsSetKey SUB
Subject Claim.Identifies the subject of the JWT.
-
AUD
public static final JwtClaimsSetKey AUD
Audience Claim.Identifies the audience that the JWT is intended for.
-
IAT
public static final JwtClaimsSetKey IAT
Issued At Claim.Identifies the time at which the JWT was issued. This claim can be used to determine the age of the token.
-
NBF
public static final JwtClaimsSetKey NBF
Not Before Claim.Identifies the time before which the token MUST NOT be accepted for processing.
-
EXP
public static final JwtClaimsSetKey EXP
Expiration Time Claim.Identifies the expiration time on or after which the token MUST NOT be accepted for processing.
-
CUSTOM
public static final JwtClaimsSetKey CUSTOM
Custom (private) Claim.Represents any claim not registered in the JWT spec.
-
-
Method Detail
-
values
public static JwtClaimsSetKey[] 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 (JwtClaimsSetKey c : JwtClaimsSetKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JwtClaimsSetKey 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 theJwtClaimsSetKey
constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
toString()
-
getClaimSetKey
public static JwtClaimsSetKey getClaimSetKey(String claimSetKey)
Gets theJwtClaimsSetKey
constant that matches the givenString
(case-insensitive).- Parameters:
claimSetKey
- The case-insensitiveString
representation of aJwtClaimsSetKey
.- Returns:
- The matching
JwtClaimsSetKey
orCUSTOM
for keys not in the JWT spec.
-
toString
public String toString()
Turns theJwtClaimsSetKey
constant into a lowercaseString
.- Overrides:
toString
in classEnum<JwtClaimsSetKey>
- Returns:
-
-