rust-jwt
rust-jwt copied to clipboard
Add support for multi-value aud claims
Introduces a StringOrVec struct and custom serializer/deserialzer for the aud claim.
Fixes Issue #83
@mikkyang If you can look at this ASAP, it'd be much appreciated. Need to get a new release out with this change incorporated. Have a deadline of Wednesday, June 22 to get a release going.
This PR covers deserializing the aud
claim correctly, but since one
and multi
are private fields, how is this supposed to let the end user set a value for them to serialize it?
How about an Audience
enum instead of a struct? Then you could have Audience::String
and Audience::Array
. This is a little more idiomatic IMO.