Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
devsbryan opened this issue Jan 5, 2024 · 2 comments
Open

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

devsbryan opened this issue Jan 5, 2024 · 2 comments
Labels
bug Identified as a potential bug documentation Needs a documentation update good first issue Should be pretty easy to do help wanted Not actively being worked on. If you plan to contribute, please drop a note. medium effort Likely a few days of development effort small effort Likely less than a day of development effort.
Milestone

Comments

@devsbryan
Copy link

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.

https://ocelot.readthedocs.io/en/latest/features/authentication.html#auth0-by-okta

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

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

@raman-m raman-m added bug Identified as a potential bug documentation Needs a documentation update labels Jan 5, 2024
@raman-m
Copy link
Member

raman-m commented Jan 5, 2024

Hi Bryan!
Welcome to Ocelot world! 🐯

Thanks for reporting this issue and letting us know about these changes in claims mapping!
Will you contribute to update the docs?

Ideally, this issue ticket can be closed by a PR with acceptance tests or develop a sample to merge.
Writing acceptance tests is not easy.
Create a sample is a bit easier.
But I believe simple updating of our docs will be fine too.

Do you have an intention to work on this issue being created by you?

@raman-m raman-m changed the title Authentication docs could do with a note around .net 8 changes Authentication docs could do with a note around .NET 8 changes Jan 5, 2024
@raman-m raman-m added the Oct'24 October 2024 release label Jun 16, 2024
@raman-m raman-m added this to the Summer'24 milestone Jun 16, 2024
@raman-m raman-m added Dec'24 December 2024 release and removed Oct'24 October 2024 release labels Oct 26, 2024
@raman-m raman-m modified the milestones: October'24, Autumn'24 Oct 26, 2024
@raman-m raman-m added help wanted Not actively being worked on. If you plan to contribute, please drop a note. medium effort Likely a few days of development effort small effort Likely less than a day of development effort. labels Oct 26, 2024
@raman-m raman-m pinned this issue Oct 26, 2024
@raman-m
Copy link
Member

raman-m commented Nov 24, 2024

@devsbryan Could you help us to upgrade docs plz?

@raman-m raman-m added good first issue Should be pretty easy to do and removed Dec'24 December 2024 release labels Nov 24, 2024
@raman-m raman-m modified the milestones: Autumn'24, .NET 9 Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identified as a potential bug documentation Needs a documentation update good first issue Should be pretty easy to do help wanted Not actively being worked on. If you plan to contribute, please drop a note. medium effort Likely a few days of development effort small effort Likely less than a day of development effort.
Projects
None yet
Development

No branches or pull requests

2 participants