AzureAD / azure-activedirectory-identitymodel-extensions-for-dotnet

IdentityModel extensions for .Net
MIT License
1.03k stars 386 forks source link

Improve the performance of ClaimsPrincipal and ClaimsIdentity #2531

Open jennyf19 opened 4 months ago

jennyf19 commented 4 months ago

Improve the performance of ClaimsPrincipal and ClaimsIdentity by backing them by a JsonWebToken, instead of an array of Claims, to remove un-necessary allocations, and improve performance from o(N) to o(1).

bartonjs commented 2 months ago

ClaimsPrincipal and ClaimsIdentity are both from dotnet/runtime, not this repository. And they can't use JsonWebToken because that comes from this repository (inverted layering).

jmprieur commented 2 months ago

It would be a derived class from ClaimsIdentity, @bartonjs, not a re-implementation of ClaimsIdenitty.