Django

Code

Ticket #3609 (closed: wontfix)

Opened 2 years ago

Last modified 9 months ago

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

Reported by: pterk@datatailors.com Assigned to: adrian
Milestone: Component: Contrib apps
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

BasicAuthentication.diff (4.6 kB) - added by pterk@datatailors.com on 02/28/07 15:05:22.

Change History

02/28/07 15:05:22 changed by pterk@datatailors.com

  • attachment BasicAuthentication.diff added.

02/28/07 15:09:21 changed by anonymous

  • needs_better_patch changed.
  • component changed from Admin interface to Contrib apps.
  • needs_tests changed.
  • needs_docs changed.

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

02/28/07 16:17:25 changed by jacob

  • status changed from new to closed.
  • resolution set to wontfix.

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).

10/01/08 05:46:38 changed by guettli

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


Add/Change #3609 (BasicAuthenticationMiddleware: Use Basic HTTP Authentication to log (django users) in)




Change Properties
Action