DuendeSoftware / Support

Support for Duende Software products
20 stars 0 forks source link

How to add one claim as a list? #332

Closed arisliang closed 1 year ago

arisliang commented 1 year ago

Which version of Duende IdentityServer are you using? 6.1.7

Which version of .NET are you using? 6.0

Describe the bug I'm trying to add user claims to GrantValidationResult in extension grant ValidateAsync. I notice if add two or more claims with the same name, the claim will be added as list. If add one claim, the value will be a string. e.g.:

"type1": "value1", "type2": [ "value2", "value3" ],

Expected behavior Is there a way to add one claim, but as a list? Like:

"type1": [ "value1" ]

Similar to how scope behaves.

"scope": [ "api1" ],

arisliang commented 1 year ago

Found this issue does it https://github.com/dotnet/aspnetcore/issues/18178