© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
1 reply
Fruity Mike

Default mapping logic from jwt payload to claims

Hey,

I have asp.net core web api with jwt authentication. It's fairly "default", something you would find on most tutorials.

If I would generate token it would have payload:
{"sub":"user","exp":1662070302}
{"sub":"user","exp":1662070302}


So whenever token is successfully validated I'm expecting to have two claims with same keys as types and values. But for some reason I'm getting the following:
Type: $http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier Value: user
Type: $exp Value: 1662070302
Type: $http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier Value: user
Type: $exp Value: 1662070302


Because of this I have a question. Is there a flag of some sort to disable this key to type override or I have to override this override?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Token Claims Membership Mapping
C#CC# / help
16mo ago
❔ JWT Authentication: Name goes to claims not identity.Name
C#CC# / help
3y ago
❔ Invalidating Claims from previous sessions claims when Logging In
C#CC# / help
4y ago
❔ JWT token claims not working anymore after deploying application to Azure web app.
C#CC# / help
4y ago