-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
AuthenticationOcelot feature: AuthenticationOcelot feature: AuthenticationNET9.NET 9 release.NET 9 releasebugIdentified as a potential bugIdentified as a potential bugdocumentationNeeds a documentation updateNeeds a documentation updatemergedIssue has been merged to dev and is waiting for the next releaseIssue has been merged to dev and is waiting for the next release
Milestone
Description
Docs Update Suggestion
The section in the authentication docs that deals with overriding the mapping of the scp
claim no longer applies in .net 8.
The JwtSecurityTokenHandler
is no longer the default, and has been replaced by JsonWebTokenHandler
The example in the docs will work in .net 8 by simply replacing the reference to the JwtSecurityTokenHandler
.
i.e.
JsonWebTokenHandler.DefaultInboundClaimTypeMap.Remove("scp");
JsonWebTokenHandler.DefaultInboundClaimTypeMap.Add("scp", "scope");
It is perhaps also worth mentioning in the docs that this does not solely apply to using Okta (in my case it also applies to Azure AD)
References:
- Update .NET 8 Docs for Claim Mapping dotnet/AspNetCore.Docs#30935
- https://learn.microsoft.com/en-us/aspnet/core/security/authentication/claims?view=aspnetcore-8.0#claims-namespaces-default-namespaces
- [Breaking change]: JwtBearer, WsFederation, and OpenIdConnect events context properties of type SecurityToken now return a JSonWebToken by default aspnet/Announcements#508
Motivation for New Feature
- Avoid confusion for anyone attempting to configure Ocelot authentication on .NET 8.
- Without this change, scopes do not work.
Steps to Reproduce the Problem
n/a
Specifications
n/a
Metadata
Metadata
Assignees
Labels
AuthenticationOcelot feature: AuthenticationOcelot feature: AuthenticationNET9.NET 9 release.NET 9 releasebugIdentified as a potential bugIdentified as a potential bugdocumentationNeeds a documentation updateNeeds a documentation updatemergedIssue has been merged to dev and is waiting for the next releaseIssue has been merged to dev and is waiting for the next release