rust-jwt icon indicating copy to clipboard operation
rust-jwt copied to clipboard

Multi-valued aud claim not supported

Open SSMKittel opened this issue 2 years ago • 2 comments

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"] }

SSMKittel avatar Apr 23 '22 15:04 SSMKittel

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

glimberg avatar Jun 23 '22 20:06 glimberg

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

kulak avatar Sep 14 '23 05:09 kulak