Set audience validation default to off #25
Merged
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.
Checklist
Description of Changes
Since
jsonwebtoken 9x
audience is validated by default. The library's validation of that token is itself finicky since audience can be provided in multiple (valid) ways. To avoid creating production incidents because of unexpected upstream library's parsing strategy, audience-validation will default to off as in8.x
, then the client gets the responsibility to validate audience after decoding.Whether this should be considered a major-version bump or bugfix is debatable. If this audience validation change is considered a bug, then this is a bugfix from a bug introduced in0.6.1
if that's not considered a bug then0.6.1
should have been0.7.0
and this should be0.8.0
, I'm leaning towards this being a bugfix since this behaviour was not intended, placing us at0.6.2
.Drive-by fixing the changelog andtoml
version.There was some spec-noncompliance where userinfo-endpoint was required although the spec says recommended, made that optional, causing this to be a major version bump anyway.
Also found a bug in the
PKCE
+client-secret flow that was fixed up.Fixed the examples by duplicating them, one for basic auth and one for PKCE, they are now both up-to-date and hopefully a bit easier to understand.