You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to give my API routes a scope attributes so that I can have a middleware check for authorization.
Actual behaviour
My current approach would be either to create a wrapper for the handler with a decorator or to fork web_urldispatcher.py.
I feel like both approaches are pretty horrible.
Btw I'm aware that this issue is quite similar to #2038 but I think while functools.partial is a fine solution to pass arguments to the handler,
a wrapper is quite a bad solution in my case as this solution does not let me add my middleware to the app's middleware chain.
The text was updated successfully, but these errors were encountered:
Long story short
I'd like to give my API routes a scope attributes so that I can have a middleware check for authorization.
Actual behaviour
My current approach would be either to create a wrapper for the handler with a decorator or to fork web_urldispatcher.py.
I feel like both approaches are pretty horrible.
Steps to reproduce
Imagine something like this:
Btw I'm aware that this issue is quite similar to #2038 but I think while
functools.partial
is a fine solution to pass arguments to the handler,a wrapper is quite a bad solution in my case as this solution does not let me add my middleware to the app's middleware chain.
The text was updated successfully, but these errors were encountered: