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

Where to place logic adding additional claims obtained via an alternate REST endpoint #861

Open
ryanewtaylor opened this issue Apr 22, 2024 · 1 comment
Labels

Comments

@ryanewtaylor
Copy link

ryanewtaylor commented Apr 22, 2024

This is a question. I hope this is the appropriate place to ask this.

I am working with the AspNet.Security.OAuth.ArcGIS provider and everything is working quite well. However, I need to add additional claims from an alternate endpoint, specifically the portal/sharing/rest/community/users/{username} endpoint. Here we are able to determine the groups that the user belongs to and add various claims based on those groups.

Would an appropriate place to put this logic be in OnCreatingTicket?

I will need to issue a new GET with the recently obtained username and access token and await its response.

Is there a better location to place this custom logic?

@martincostello
Copy link
Member

OnCreatingTicket is a good option to add extra claims - for example, I've used it to add extra claims when logging in with GitHub based on the user's organisations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants