Hi fellow django users,
I have a web site where I require authentication for all views and have
successfully created custom middleware to handle that (all
unauthenticated requests redirect to the login view unless the request
is for the login view).
Now, I want to extend that a bit to support HTTP BASIC AUTH so a request
can be made for a non authorized user if the correct credentials are
provided in the AUTH header.
It would probably be possible to hack a bit with my custom middleware to
support that by reading the AUTH header (if present) decoding it and
validating against the django user database, but I just have a feeling
that django must provide support for something like this already one way
or another.
I have tried to search the documentation for HTTP BASIC AUTH without
much luck.
Any ideas on how to approach this, or is the "custom middleware hack"
the right way to go?
I'll happily share any code if that helps.
Thanks a lot.
Kind regards,
Kasper Laudrup
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/3b69fefa-090e-7c66-6688-9e96203669f0%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.