We have a website running on Apache, access to which has a number of static pages protected via HTTP Basic authentication.
I\'ve written a new part of the site with
This seems to be a task for custom AuthenticationBackend
- see Django documentation on this subject, djangosnippets.org has some real-life examples of such code (see 1 or 2) (and this is not really a hard thing).
AuthenticationBackend
subclasses have to have only 2 methods defined and their code is pretty straightforward: one has to return User object for user ID, the second has to perform credentials check and return User object if the credentials are valid.