2009-12-26 11:44:21 +08:00
|
|
|
=======================
|
|
|
|
Authentication backends
|
|
|
|
=======================
|
2009-03-15 13:54:28 +08:00
|
|
|
|
|
|
|
.. module:: django.contrib.auth.backends
|
|
|
|
:synopsis: Django's built-in authentication backend classes.
|
|
|
|
|
|
|
|
This document details the authentication backends that come with Django. For
|
2009-12-26 11:44:21 +08:00
|
|
|
information on how to use them and how to write your own authentication
|
2009-03-15 13:54:28 +08:00
|
|
|
backends, see the :ref:`Other authentication sources section
|
2010-08-20 03:27:44 +08:00
|
|
|
<authentication-backends>` of the :doc:`User authentication guide
|
|
|
|
</topics/auth>`.
|
2009-03-15 13:54:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
Available authentication backends
|
|
|
|
=================================
|
|
|
|
|
|
|
|
The following backends are available in :mod:`django.contrib.auth.backends`:
|
|
|
|
|
|
|
|
.. class:: ModelBackend
|
|
|
|
|
|
|
|
This is the default authentication backend used by Django. It
|
2009-05-18 00:45:28 +08:00
|
|
|
authenticates using usernames and passwords stored in the
|
2009-03-15 13:54:28 +08:00
|
|
|
:class:`~django.contrib.auth.models.User` model.
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: RemoteUserBackend
|
|
|
|
|
|
|
|
.. versionadded:: 1.1
|
|
|
|
|
|
|
|
Use this backend to take advantage of external-to-Django-handled
|
|
|
|
authentication. It authenticates using usernames passed in
|
|
|
|
:attr:`request.META['REMOTE_USER'] <django.http.HttpRequest.META>`. See
|
2010-08-20 03:27:44 +08:00
|
|
|
the :doc:`Authenticating against REMOTE_USER </howto/auth-remote-user>`
|
2009-03-15 13:54:28 +08:00
|
|
|
documentation.
|