Skip to content

Fix aud validation #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix aud validation #48

wants to merge 2 commits into from

Conversation

Bromles
Copy link

@Bromles Bromles commented Apr 15, 2024

Currently, actual behavior does not match the docs.

For Validation's field aud it says: "If it contains a value, the validation will check that the aud claim value is in the values provided.". Reading this, I assume that it will skip validation of aud claim if this option is None

But in reality, it will fail for any token if the aud is None (because of validation logic inside jsonwebtoken crate)

This PR fixes it by setting an appropriate option validate_aud for validation options of jsonwebtoken

@NotNorom
Copy link
Contributor

NotNorom commented Jun 3, 2024

LGTM!

@blablacio
Copy link
Contributor

Any plans to merge this PR anytime soon @cduvray?

@folex
Copy link

folex commented Nov 13, 2024

Stumbled upon this bug, too.

Am I right that there's no way to disable aud validation right now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants