Opened 18 years ago

Closed 18 years ago

Last modified 16 years ago

#3609 closed (wontfix)

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

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

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@… 18 years ago.

Download all attachments as: .zip

Change History (4)

by pterk@…, 18 years ago

Attachment: BasicAuthentication.diff added

comment:1 by anonymous, 18 years ago

Component: Admin interfaceContrib apps

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

comment:2 by Jacob, 18 years ago

Resolution: wontfix
Status: newclosed

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 by Thomas Güttler, 16 years ago

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

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