-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Claims with ClaimValueTypes.Double are not serialized as Number types #82
Comments
Thanks for reporting. We will look into it. |
You can use |
Actually - the real question would be - is I added explicit double support in this PR |
@leastprivilege Regarding the PR: Why no changes in ClaimsExtensions.cs? I'm not sure where those extension methods are actually used but wouldn't it be consistent to have the same claim parsing logic everywhere? |
Good point - that might be an oversight. The code I changed so far is def the place where you run into your problem |
tracked here: |
Hey, could you try the preview to see if it works as expected? v6.1.1-preview.1 See here to setup the dev feed: |
@leastprivilege I don't see the v6.1.1, only a handful of v6.2.0. So I tried with the v6.2.0-alpha.0.5 and it doesn't work as expected. It still returns a |
I cleaned the feed. The preview is now available. |
In v6.1.1-preview.1, it works as expected. Thank you. |
OK - thanks! |
Which version of Duende IdentityServer are you using?
6.1.0
Which version of .NET are you using?
.NET 6
Describe the bug
Claims with
ClaimValueTypes.Double
serialized to JSON asString
instead ofNumber
when being added tocontext
in theIProfileService.GetProfileDataAsync(ProfileDataRequestContext context)
method.To Reproduce
Add a
Claim
with value type ofClaimValueTypes.Double
usingcontext.AddRequestedClaims()
method in theIProfileService.GetProfileDataAsync(ProfileDataRequestContext context)
implementation.Expected behavior
The claim value in the JSON retrieved from the
userinfo
endpoint must be of typeNumber
instead ofString
.I presume the problem is in ClaimsExtensions.cs and/or TokenExtensions.cs.
The text was updated successfully, but these errors were encountered: