You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While benchmarking an ASP.NET Core app we found that ~5% of allocations come from a substring call to remove "Bearer " from the access token provided in the "Authorization" header. We can avoid this substring call if TokenHandler.ValidateTokenAsync had a ReadOnlySpan<char> overload.
While benchmarking an ASP.NET Core app we found that ~5% of allocations come from a substring call to remove
"Bearer "
from the access token provided in the "Authorization" header. We can avoid this substring call ifTokenHandler.ValidateTokenAsync
had aReadOnlySpan<char>
overload.azure-activedirectory-identitymodel-extensions-for-dotnet/src/Microsoft.IdentityModel.Tokens/TokenHandler.cs
Line 66 in 286d780
ASP.NET Core calls
https://github.com/dotnet/aspnetcore/blob/415cf1ec6d004648c27ab78359fd57d20c7c9797/src/Security/Authentication/JwtBearer/src/JwtBearerHandler.cs#L86
https://github.com/dotnet/aspnetcore/blob/415cf1ec6d004648c27ab78359fd57d20c7c9797/src/Security/Authentication/JwtBearer/src/JwtBearerHandler.cs#L107
Other methods like
TokenHandler.ReadToken
might also benefit, but I haven't analyzed them.The text was updated successfully, but these errors were encountered: