Added RemoteUserMiddleware to middleware reference page.

This commit is contained in:
Tim Graham 2014-04-16 07:22:15 -04:00
parent 4e3d8ae610
commit 465980d070
2 changed files with 8 additions and 5 deletions

View File

@ -27,19 +27,17 @@ use of the ``REMOTE_USER`` value using the ``RemoteUserMiddleware`` and
Configuration Configuration
============= =============
.. class:: django.contrib.auth.middleware.RemoteUserMiddleware
First, you must add the First, you must add the
:class:`django.contrib.auth.middleware.RemoteUserMiddleware` to the :class:`django.contrib.auth.middleware.RemoteUserMiddleware` to the
:setting:`MIDDLEWARE_CLASSES` setting **after** the :setting:`MIDDLEWARE_CLASSES` setting **after** the
:class:`django.contrib.auth.middleware.AuthenticationMiddleware`:: :class:`django.contrib.auth.middleware.AuthenticationMiddleware`::
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
... '...',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.RemoteUserMiddleware', 'django.contrib.auth.middleware.RemoteUserMiddleware',
... '...',
) )
Next, you must replace the :class:`~django.contrib.auth.backends.ModelBackend` Next, you must replace the :class:`~django.contrib.auth.backends.ModelBackend`
with ``RemoteUserBackend`` in the :setting:`AUTHENTICATION_BACKENDS` setting:: with ``RemoteUserBackend`` in the :setting:`AUTHENTICATION_BACKENDS` setting::

View File

@ -204,6 +204,11 @@ Adds the ``user`` attribute, representing the currently-logged-in user, to
every incoming ``HttpRequest`` object. See :ref:`Authentication in Web requests every incoming ``HttpRequest`` object. See :ref:`Authentication in Web requests
<auth-web-requests>`. <auth-web-requests>`.
.. class:: RemoteUserMiddleware
Middleware for utilizing Web server provided authentication. See
:doc:`/howto/auth-remote-user` for usage details.
.. class:: SessionAuthenticationMiddleware .. class:: SessionAuthenticationMiddleware
.. versionadded:: 1.7 .. versionadded:: 1.7