azure-activedirectory-identitymodel-extensions-for-dotnet icon indicating copy to clipboard operation
azure-activedirectory-identitymodel-extensions-for-dotnet copied to clipboard

[Feature Request] Ability for JWT claims to be complex objects

Open pmaytak opened this issue 5 months ago • 0 comments

Is your feature request related to a problem? Please describe. See details in related issue #2585.

When serializing claims, IdentityModel 6x used to serialize the whole object (using Newtonsoft). 7x+ calls ToString() on the claim object instead.

Describe the solution you'd like Ability to have JWT claims be of custom type which are serialized correctly. Related methods like TryGetPayloadValue<CustomClass>(name) should also work.

Describe alternatives you've considered Pass claim as a JsonElement. See example in https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/2455#issuecomment-1911006805

pmaytak avatar Sep 05 '24 22:09 pmaytak