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
use as oauth reverse proxy for non ASGI apps #45
Comments
This is a fascinating idea! I'd love to see a pull request for this. I'm not too keen on the |
After thinking about this a bit more, I don't think it's appropriate as a feature for |
Thanks Simon, it makes sense since A small refactoring lets me subclass the Would it be okay with you if I create a new repository for the oauth application with |
Yes absolutely - go ahead with that new repo. Thanks for the fix in #49 - I just landed it. |
Use-case:
Adding authentication to a non-python app running behind Nginx. Nginx provides an auth_request directive to authenticate all requests against an external service (link).
Change:
I tweaked the code here a tiny bit to use this app as the auth service. Nginx only accepts 200 and 4xx from authentication subrequests so we return a 401 when the user is not logged in and make Nginx redirect them to the login screen provided by this app.
Nginx config:
Does this use-case make sense for the project? Happy to make a quick PR for it.
P.S. Thank you for writing this! I had difficulty grasping other python libraries doing OAuth.
The text was updated successfully, but these errors were encountered: