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

Add configuration setting for 'route action middleware' #266

Closed
wants to merge 1 commit into from

Conversation

DellanX
Copy link

@DellanX DellanX commented Feb 6, 2024

Implements #265

Specifically, a developer can define additional middleware for route actions.
This change allows my server to successfully add my Oauth2.0 scope checks to my desired API endpoints.
I can successfully set the scopes as User.Group.Update or User.Chat.Update to my tokens, and be blocked on API requests if I don't have the required scope.

Note, that for my case, I defined a closure that I provide to each call of the routeActionMiddleware function. I'd still like to have it defined on the server once, but didn't see a way to implement that without significant refactors.

Finally, I can definitely clean this up as desired. Let me know if a different name/key is preferred, or if you want me to remove the type annotations.

@DellanX DellanX changed the title Add configuration setting for 'route actions' Add configuration setting for 'route action middleware' Feb 6, 2024
@DellanX DellanX changed the base branch from main to develop February 6, 2024 14:37
@lindyhopchris
Copy link
Contributor

Closing in favour of #268

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

Successfully merging this pull request may close these issues.

2 participants