Skip to content
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

Feature request: Allow multiple audiences for JWT #302

Open
JonasKs opened this issue Sep 13, 2022 · 3 comments
Open

Feature request: Allow multiple audiences for JWT #302

JonasKs opened this issue Sep 13, 2022 · 3 comments

Comments

@JonasKs
Copy link

JonasKs commented Sep 13, 2022

Hi,

We'd like to accept multiple audiences, but jwt.decode() does not support an iterable. This is supported in PyJWT, and the _validate_aud() seems to already accept a list of audiences from the token.

I'd happily submit a PR if accepted.

@aaronmarkey
Copy link

Hey-o, just here to voice support for this issue.

RFC 7519 does state the aud claim may or may not be included, can be null (in which case it's invalid), or a string, or an array of strings. Python typings would be something like None|str|Iterable[str].

@travishaby
Copy link

Would also love this feature! Happy to contribute to the PR as well if we get the go-ahead 🙏

@ningen1
Copy link

ningen1 commented Dec 4, 2023

But here it says:
'aud' Audience str or list(str) The recipient that the JWT is intended for.
Error: audience must be a string or None

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

No branches or pull requests

4 participants