Monday, July 18, 2022

Re: External Authentication with username in header

Middleware is how Django does it.

https://docs.djangoproject.com/en/4.0/ref/middleware/#module-django.contrib.auth.middleware

On July 15, 2022 4:19:10 PM CDT, Mark Glass <mark.glass@gmail.com> wrote:
I would like to change the link that opens a Django app. Currently the app is launched with GET http://localhost:8000. I would like to include a username and password in the header. The header would be intercepted somehow (Middleware?) and the user marked as authenticated. The app will then launch for the user with a default role.

This will replace a login page and Django internal authentication. 

Can I implement this using middleware? If so, how?

Thank you 

No comments:

Post a Comment