Skip to content

[SDK-2751] Serialize audience claim when a List#512

Merged
jimmyjames merged 1 commit intomasterfrom
serialize-lists
Sep 10, 2021
Merged

[SDK-2751] Serialize audience claim when a List#512
jimmyjames merged 1 commit intomasterfrom
serialize-lists

Conversation

@jimmyjames
Copy link
Copy Markdown
Contributor

Changes

As discussed in #508, when constructing a JWT using the withPayload method, the aud claim cannot be properly serialized, as we only expected it to be a String array (as it is when using the withAudience method). This change updates the PayloadSerializer to handle both String arrays and Lists to be serialized for the audience claim.

Fixes #508

@jimmyjames jimmyjames added this to the v3-Next milestone Sep 3, 2021
@jimmyjames jimmyjames requested a review from a team as a code owner September 3, 2021 18:34
@jimmyjames jimmyjames merged commit 971d6fa into master Sep 10, 2021
@yeDor
Copy link
Copy Markdown

yeDor commented Sep 10, 2021

Hello @jimmyjames, @evansims, thanks for a fix.
One question on this: why is implementation is aimed to List specifically, and not to the Collection, as it was discussed in #508 ?

@jimmyjames jimmyjames modified the milestones: v3-Next, 3.18.2 Sep 16, 2021
@jimmyjames jimmyjames mentioned this pull request Sep 16, 2021
@jimmyjames jimmyjames deleted the serialize-lists branch February 25, 2022 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PublicClaims.AUDIENCE (aud) expected to be String or "Array of Strings", not Collection(aka List) by PayloadSerializer

3 participants