-
Notifications
You must be signed in to change notification settings - Fork 926
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK-3226] Expose claim header constants
- Loading branch information
1 parent
af04b22
commit 05c925e
Showing
12 changed files
with
166 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.auth0.jwt; | ||
|
||
/** | ||
* Contains constants representing the JWT header parameter names. | ||
*/ | ||
public final class HeaderParams { | ||
|
||
private HeaderParams() {} | ||
|
||
/** | ||
* The algorithm used to sign a JWT. | ||
*/ | ||
public static String ALGORITHM = "alg"; | ||
|
||
/** | ||
* The content type of a JWT. | ||
*/ | ||
public static String CONTENT_TYPE = "cty"; | ||
|
||
/** | ||
* The media type of a JWT. | ||
*/ | ||
public static String TYPE = "typ"; | ||
|
||
/** | ||
* The key ID of a JWT used to specify the key for signature validation. | ||
*/ | ||
public static String KEY_ID = "kid"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.auth0.jwt; | ||
|
||
/** | ||
* Contains constants representing the name of the Registered Claim Names as defined in Section 4.1.1 of | ||
* <a href="https://datatracker.ietf.org/doc/html/rfc7519#section-4.1">RFC 7529</a> | ||
*/ | ||
public final class StandardClaims { | ||
|
||
private StandardClaims() { | ||
} | ||
|
||
/** | ||
* The "iss" (issuer) claim identifies the principal that issued the JWT. | ||
*/ | ||
public static String ISSUER = "iss"; | ||
|
||
/** | ||
* The "sub" (subject) claim identifies the principal that is the subject of the JWT. | ||
*/ | ||
public static String SUBJECT = "sub"; | ||
|
||
/** | ||
* The "aud" (audience) claim identifies the recipients that the JWT is intended for. | ||
*/ | ||
public static String AUDIENCE = "aud"; | ||
|
||
/** | ||
* The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be | ||
* accepted for processing. | ||
*/ | ||
public static String EXPIRES_AT = "exp"; | ||
|
||
/** | ||
* The "nbf" (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing. | ||
*/ | ||
public static String NOT_BEFORE = "nbf"; | ||
|
||
/** | ||
* The "iat" (issued at) claim identifies the time at which the JWT was issued. | ||
*/ | ||
public static String ISSUED_AT = "iat"; | ||
|
||
/** | ||
* The "jti" (JWT ID) claim provides a unique identifier for the JWT. | ||
*/ | ||
public static String JWT_ID = "jti"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.