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?
Microsoft.IdentityModel.Protocols.OpenIdConnect: 7.0.2
Where is the issue?
M.IM.JsonWebTokens
M.IM.KeyVaultExtensions
M.IM.Logging
M.IM.ManagedKeyVaultSecurityKey
M.IM.Protocols
M.IM.Protocols.OpenIdConnect
M.IM.Protocols.SignedHttpRequest
M.IM.Protocols.WsFederation
M.IM.TestExtensions
M.IM.Tokens
M.IM.Tokens.Saml
M.IM.Validators
M.IM.Xml
S.IM.Tokens.Jwt
Other (please describe)
Is this a new or an existing app?
a. The app is in production and I have upgraded from 6.0.33 to 7.0.2 of Microsoft.IdentityModel.Protocols.OpenIdConnect
Repro
Have a JWT that contains a json boolean, like so
{
"testClaim": true
}
When this token is received by ASP.NET Core, a ClaimsPrincipal is produced with an ClaimsIdentity that has a "testClaim" Claim on it
Expected behavior
The value of "testClaim" used to be "true"
Actual behavior
The value of "testClaim" used is now "True"
This is breaking because if you have code like
new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.RequireClaim("testClaim", "true")
then "True" will not satisfy that requirement anymore.
I'm not sure if this was an intentional change but it should be at a minimum called out in the breaking changes
The text was updated successfully, but these errors were encountered:
correct. Since Claim.Value is a string, my assumption would be that true is somewhere read and parsed as a System.Boolean to be then .ToString()'d when constructing the Claims because true.ToString() results in "True"
Which version of Microsoft.IdentityModel are you using?
Microsoft.IdentityModel.Protocols.OpenIdConnect: 7.0.2
Where is the issue?
Is this a new or an existing app?
a. The app is in production and I have upgraded from 6.0.33 to 7.0.2 of Microsoft.IdentityModel.Protocols.OpenIdConnect
Repro
Have a JWT that contains a json boolean, like so
When this token is received by ASP.NET Core, a ClaimsPrincipal is produced with an ClaimsIdentity that has a "testClaim" Claim on it
Expected behavior
The value of "testClaim" used to be "true"
Actual behavior
The value of "testClaim" used is now "True"
This is breaking because if you have code like
then "True" will not satisfy that requirement anymore.
I'm not sure if this was an intentional change but it should be at a minimum called out in the breaking changes
The text was updated successfully, but these errors were encountered: