Back to Jose

Interface: JWTClaimValidationFailure

docs/util/errors/interfaces/JWTClaimValidationFailure.md

6.2.91.0 KB
Original Source

Interface: JWTClaimValidationFailure

šŸ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.

The shape shared by the two errors thrown during JWT Claims Set validation.

[!NOTE]
JWTExpired does not extend JWTClaimValidationFailed, so instanceof JWTClaimValidationFailed is false for an expired JWT. Use JWTClaimValidationError or the code discriminant to handle both.

Properties

claim

• claim: string

The Claim for which the validation failed.


payload

• payload: JWTPayload

The parsed JWT Claims Set (aka payload).


reason

• reason: string

Reason code for the validation failure.