Enum Class JwtClaimsSetKey
- All Implemented Interfaces:
Serializable
,Comparable<JwtClaimsSetKey>
,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JwtClaimsSetKey
getClaimSetKey
(String claimSetKey) Gets theJwtClaimsSetKey
constant that matches the givenString
(case-insensitive).toString()
Turns theJwtClaimsSetKey
constant into a lowercaseString
.value()
Returns a lowercase String of theJwtClaimsSetKey
constant.static JwtClaimsSetKey
Returns the enum constant of this class with the specified name.static JwtClaimsSetKey[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
JWT ID Claim.Provides a unique identifier for the JWT.
-
ISS
Issuer Claim.Identifies the principal that issued the JWT.
-
SUB
Subject Claim.Identifies the subject of the JWT.
-
AUD
Audience Claim.Identifies the audience that the JWT is intended for.
-
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
Not Before Claim.Identifies the time before which the token MUST NOT be accepted for processing.
-
EXP
Expiration Time Claim.Identifies the expiration time on or after which the token MUST NOT be accepted for processing.
-
CUSTOM
Custom (private) Claim.Represents any claim not registered in the JWT spec.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
value
Returns a lowercase String of theJwtClaimsSetKey
constant.- Returns:
- Lowercase String representation of the constant.
- See Also:
-
getClaimSetKey
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
Turns theJwtClaimsSetKey
constant into a lowercaseString
.- Overrides:
toString
in classEnum<JwtClaimsSetKey>
- Returns:
-