Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#3609 closed (wontfix)

BasicAuthenticationMiddleware: Use Basic HTTP Authentication to log (django users) in

Reported by: pterk@… Owned by: adrian
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This is a patch against [4649]. It allows users to log in with Basic HTTP Authentication i.s.o. login forms using some simple middleware (entire patch is ~50 lines). I was unaware of http://code.djangoproject.com/wiki/GenericAuthorization so I'm not sure about its usefulness in the long run.

You can enable it by including 'django.contrib.auth.middleware.BasicAuthenticationMiddleware' in your MIDDLEWARE_CLASSES and then adding the following lines in your settings.py:

BASIC_WWW_AUTHENTICATION = True

WWW_AUTHENTICATION_REALM = "djangolures.com"

Attachments (1)

BasicAuthentication.diff (4.6 KB) - added by pterk@… 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by pterk@…

comment:1 Changed 9 years ago by anonymous

  • Component changed from Admin interface to Contrib apps
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

The component-selectbox seems to be missing a middleware option? I guess 'contrib apps' is more appropriate for the moment.

comment:2 Changed 9 years ago by jacob

  • Resolution set to wontfix
  • Status changed from new to closed

I think this isn't quite appropriate for direct inclusion in Django (but you might want to post it to http://djangosnippets.org/ in case anyone else finds it useful).

comment:3 Changed 7 years ago by guettli

See #689 for handling of REMOTE_USER (HTTP Basic Auth done by webserver)

Note: See TracTickets for help on using tickets.
Back to Top