1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

multi-auth: Small formatting changes to docs/authentication.txt

git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@2919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2006-05-16 16:27:36 +00:00
parent 863c16a16b
commit 93937ed38a

View File

@ -659,13 +659,14 @@ Regardless, ``authenticate`` should check the credentials it gets, and if they
are valid, it should return a user object that matches those credentials.
The Django admin system is tightly coupled to the Django User object described
at the beginning of this document. For now, the best way to deal with this is to
create a Django User object for each user that exists for your backend (i.e.
in your ldap directory, your external sql database, etc.) You can either
at the beginning of this document. For now, the best way to deal with this is
to create a Django User object for each user that exists for your backend
(i.e. in your ldap directory, your external sql database, etc.) You can either
write a script to do this in advance, or your ``authenticate`` method can do
it the first time a user logs in. `django.contrib.auth.backends.SettingsBackend`_
is an example of the latter approach. Note that you don't have to save a user's
password in the Django User object. Your backend can still check the password
against an external source, and return a Django User object.
it the first time a user logs in.
`django.contrib.auth.backends.SettingsBackend`_ is an example of the latter
approach. Note that you don't have to save a user's password in the Django
User object. Your backend can still check the password against an external
source, and return a Django User object.
.. _django.contrib.auth.backends.SettingsBackend: http://code.djangoproject.com/browser/django/branches/magic-removal/django/contrib/auth/backends.py