Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Windows, JwtPayload.Claims works fine. If a JWT claim has an array of strings, for example, "scope": ["openid", "email", "profiles"], it decomposes them fine. One claim is turned into three.
With Mono however (4.0.1), the claim value is treated as an ArrayList, so it doesn't match IEnumerable and thus falls through to being serialized as JSON.
This PR works on Mono and is pretty simple. I just added a check for the ArrayList type and then mimicked the IEnumerable decomposition.
If it's too big of a change, I'm at least hoping it starts a discussion on how to fix claims for use with Mono.
In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.msopentech.com.
TTYL, MSOTBOT;
Thanks, MSOTBOT;
Thanks @ryan1234 for pushing this through, wish we could get this working on mono 3.12.1 as well