Skip to content

Authentication docs could do with a note around .NET 8 changes #1876

@devsbryan

Description

@devsbryan

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:

Motivation for New Feature

  1. Avoid confusion for anyone attempting to configure Ocelot authentication on .NET 8.
  2. Without this change, scopes do not work.

Steps to Reproduce the Problem

n/a

Specifications

n/a

Metadata

Metadata

Assignees

Labels

AuthenticationOcelot feature: AuthenticationNET9.NET 9 releasebugIdentified as a potential bugdocumentationNeeds a documentation updatemergedIssue has been merged to dev and is waiting for the next release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions