You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version of Microsoft.IdentityModel are you using?
Note that to get help, you need to run the latest version.
Where is the issue?
[ x ] M.IM.JsonWebTokens
Is this a new or an existing app?
Following-up the removal of NewtonSoft.json, the actual claim type returned by TryGetPayloadValue when passing object, is different. For instance:
If we are trying to get the value of the audience claim("aud"), when there is a single audience, previously subjectToken.TryGetPayloadValue("aud", out object claimValue) would retum claimValue as a string.
With Wilson 7.0.0, the claimValue retumed as a IList.
It is important for customers to maintain the same type.
The text was updated successfully, but these errors were encountered:
jmprieur
changed the title
[Bug] Regression
[Bug] breaking change in 7: TryGetPayloadValue() changes the type of returned object (compared with Identity.Model 6.x) for the "aud" claim
Sep 26, 2023
Which version of Microsoft.IdentityModel are you using?
Note that to get help, you need to run the latest version.
Where is the issue?
Is this a new or an existing app?
Following-up the removal of NewtonSoft.json, the actual claim type returned by TryGetPayloadValue when passing object, is different. For instance:
If we are trying to get the value of the audience
claim("aud")
, when there is a single audience, previouslysubjectToken.TryGetPayloadValue("aud", out object claimValue)
would retum claimValue as a string.With Wilson 7.0.0, the claimValue retumed as a
IList
.It is important for customers to maintain the same type.
Repro
Expected behavior
The claimValue for "aud" should be a string
Actual behavior
The claimValue for "aud" is now an IList (with one element)
Possible solution
Return a string if there is only one audience.
Workaround
The text was updated successfully, but these errors were encountered: