Skip to content

Commit

Permalink
docs: clarify JWTClaimValidationFailed error instance payload property
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jun 18, 2024
1 parent 1eab369 commit c1a852c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/classes/util_errors.JWTClaimValidationFailed.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ ___

**payload**: [`JWTPayload`](../interfaces/types.JWTPayload.md)

The parsed JWT payload.
The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
has however been verified. Claims Set verification happens after the JWS Signature or JWE
Decryption processes.

___

Expand Down
5 changes: 4 additions & 1 deletion docs/classes/util_errors.JWTExpired.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ ___

**payload**: [`JWTPayload`](../interfaces/types.JWTPayload.md)

The parsed JWT payload.
The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
has however been verified. Claims Set verification happens after the JWS Signature or JWE
Decryption processes.

___

Expand Down
14 changes: 12 additions & 2 deletions src/util/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ export class JWTClaimValidationFailed extends JOSEError {
/** Reason code for the validation failure. */
reason: string

/** The parsed JWT payload. */
/**
* The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
* this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
* has however been verified. Claims Set verification happens after the JWS Signature or JWE
* Decryption processes.
*/
payload: JWTPayload

/** @ignore */
Expand Down Expand Up @@ -121,7 +126,12 @@ export class JWTExpired extends JOSEError implements JWTClaimValidationFailed {
/** Reason code for the validation failure. */
reason: string

/** The parsed JWT payload. */
/**
* The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
* this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
* has however been verified. Claims Set verification happens after the JWS Signature or JWE
* Decryption processes.
*/
payload: JWTPayload

/** @ignore */
Expand Down

0 comments on commit c1a852c

Please sign in to comment.