Replies: 1 comment
-
You can checkout how to add middleware to an asgi app. See https://www.starlette.io/authentication/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am relatively new to Python, and the documentation around setting up authentication (HTTP basic, pre-shared key, etc.) seems to be somewhat lacking. I'd like to protect the entire Bento site, along with the services behind some kind of authentication.
So if you hit https://ai.myserver.com it doesn't just let anybody in and API calls can either use BASIC auth or a token.
Any suggestions on how to get this working? (I have the server, service, and SSL working, now just need to get some kind of auth in place)
One idea I had was to put the entire thing behind an NGINX reverse proxy; but feel like I should be able to do something with ASGI or Uvicorn.
https://docs.bentoml.com/en/latest/guides/asgi.html#why-should-you-mount-an-asgi-application
Beta Was this translation helpful? Give feedback.
All reactions