diff --git a/docs/howto/auth-remote-user.txt b/docs/howto/auth-remote-user.txt index 09ae92822b1..7daf4559432 100644 --- a/docs/howto/auth-remote-user.txt +++ b/docs/howto/auth-remote-user.txt @@ -27,19 +27,17 @@ use of the ``REMOTE_USER`` value using the ``RemoteUserMiddleware`` and Configuration ============= -.. class:: django.contrib.auth.middleware.RemoteUserMiddleware - First, you must add the :class:`django.contrib.auth.middleware.RemoteUserMiddleware` to the :setting:`MIDDLEWARE_CLASSES` setting **after** the :class:`django.contrib.auth.middleware.AuthenticationMiddleware`:: MIDDLEWARE_CLASSES = ( - ... + '...', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.RemoteUserMiddleware', - ... - ) + '...', + ) Next, you must replace the :class:`~django.contrib.auth.backends.ModelBackend` with ``RemoteUserBackend`` in the :setting:`AUTHENTICATION_BACKENDS` setting:: diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt index f7a6768d3c1..50f23fff313 100644 --- a/docs/ref/middleware.txt +++ b/docs/ref/middleware.txt @@ -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 `. +.. class:: RemoteUserMiddleware + +Middleware for utilizing Web server provided authentication. See +:doc:`/howto/auth-remote-user` for usage details. + .. class:: SessionAuthenticationMiddleware .. versionadded:: 1.7