mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +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:
parent
863c16a16b
commit
93937ed38a
@ -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.
|
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
|
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
|
at the beginning of this document. For now, the best way to deal with this is
|
||||||
create a Django User object for each user that exists for your backend (i.e.
|
to create a Django User object for each user that exists for your backend
|
||||||
in your ldap directory, your external sql database, etc.) You can either
|
(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
|
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`_
|
it the first time a user logs in.
|
||||||
is an example of the latter approach. Note that you don't have to save a user's
|
`django.contrib.auth.backends.SettingsBackend`_ is an example of the latter
|
||||||
password in the Django User object. Your backend can still check the password
|
approach. Note that you don't have to save a user's password in the Django
|
||||||
against an external source, and return a Django User object.
|
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
|
.. _django.contrib.auth.backends.SettingsBackend: http://code.djangoproject.com/browser/django/branches/magic-removal/django/contrib/auth/backends.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user