Replies: 1 comment 4 replies
-
What does this mean? What is your case, and why wouldn't a guard based approach work? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are several solutions in my mind at first glance.
First, using request guard in every route handler.
I have the requirements of changing permission dynamically, so it seems not applicable to my case.
Second, using request guard in
on_request
callback of the fairing.I can't do that as the guide docs state "
on_request
may not, however, abort or respond directly to the request".Finally, using a special route which matches all request and is used to authenticate and forward.
I implement the third as below:
Although it seems to work, but there are still some difficulties.
So, is there a more idiomatic way to implement this?
Beta Was this translation helpful? Give feedback.
All reactions