Repository navigation
fix: name the claim when JWT aud, iss, or nbf validation fails - #171
Merged
Merged
Conversation
commit: |
kallebysantos
approved these changes
Sep 18, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A JWT that fails a claim check used to reject with the generic "a registered claim failed validation" and a hint about the server clock. The claim-validation branch now reads the claim and reason jose reports: a claim with the wrong type is reported as malformed whatever its name, a mismatched or missing
aud/issnames the claim and the hint points at theaudience/issueroption, since #160 made those the first checks driven by server configuration, a futurenbfkeeps its clock hint, and any other claim is named with a generic hint. An emptyaudienceorissuerarray now hits the same empty-option guard as an empty string instead of surfacing as a mismatch. The status stays 401 and the failure kind staystoken, because the same jose error covers a mistyped option and a token from another project. Nine tests cover the new branches, and the reason table indocs/error-handling.mdlists every message the code emits.