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

Multi-valued aud claim not supported #83

Open
SSMKittel opened this issue Apr 23, 2022 · 2 comments
Open

Multi-valued aud claim not supported #83

SSMKittel opened this issue Apr 23, 2022 · 2 comments

Comments

@SSMKittel
Copy link

Disclaimer: I do not use this project, just happened to stumble upon it and see a potential issue (one that I had seen previously when dealing with JWTs in another language).

RegisteredClaims has audience as an Option<String>, however the JWT spec states it can also be an array of values
eg both of these are valid, but the code looks like it only handles the first case:

{ "aud": "a" }
{ "aud": [ "a", "b", "c"] }
@glimberg
Copy link

I'm running into this issue myself. Will see if I can figure out a PR for it

glimberg added a commit to glimberg/rust-jwt that referenced this issue Jun 24, 2022
Introduces a StringOrVec struct and custom serializer/deserialzer for
the aud claim.

Fixes Issue mikkyang#83
@kulak
Copy link

kulak commented Sep 14, 2023

It would be nice if fix is merged. I am having to add forked version to my references.

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

3 participants