mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #19662 -- alter auth modelbackend to accept custom username fields
Thanks to Aymeric and Carl for the review.
This commit is contained in:
parent
112c6e987d
commit
c44d748272
3 changed files with 31 additions and 7 deletions
|
@ -412,9 +412,15 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
|||
.. class:: ModelBackend
|
||||
|
||||
This is the default authentication backend used by Django. It
|
||||
authenticates using usernames and passwords stored in the
|
||||
:class:`~django.contrib.auth.models.User` model.
|
||||
authenticates using credentials consisting of a user identifier and
|
||||
password. For Django's default user model, the user identifier is the
|
||||
username, for custom user models it is the field specified by
|
||||
USERNAME_FIELD (see :doc:`Customizing Users and authentication
|
||||
</topics/auth/customizing>`).
|
||||
|
||||
It also handles the default permissions model as defined for
|
||||
:class:`~django.contrib.auth.models.User` and
|
||||
:class:`~django.contrib.auth.models.PermissionsMixin`.
|
||||
|
||||
.. class:: RemoteUserBackend
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue