package documentation

Undocumented

Module backends No module docstring; 0/1 variable, 2/5 classes documented
Module context​_processors No module docstring; 1/1 function, 0/2 class documented
Module decorators No module docstring; 3/3 functions documented
Module forms No module docstring; 0/1 variable, 1/1 function, 5/10 classes documented
Module hashers No module docstring; 0/2 constant, 6/10 functions, 12/12 classes documented
Module middleware No module docstring; 0/1 function, 2/3 classes documented
Module mixins No module docstring; 4/4 classes documented
Module models No module docstring; 3/4 functions, 6/9 classes documented
Module password​_validation No module docstring; 0/1 variable, 5/7 functions, 4/4 classes documented
Module signals Undocumented
Module validators Undocumented
Module views No module docstring; 0/1 variable, 0/1 constant, 2/2 functions, 2/10 classes documented
Module admin Undocumented
Module apps Undocumented
Module base​_user This module allows importing AbstractBaseUser even when django.contrib.auth is not in INSTALLED_APPS.
Module checks Undocumented
Package handlers Undocumented
Package management Creates permissions for all installed apps that need permissions.
Package migrations Undocumented
Module tokens No module docstring; 0/1 variable, 1/1 class documented
Module urls Undocumented

From __init__.py:

Function authenticate If the given credentials are valid, return a User object.
Function get​_user Return the user model instance associated with the given request session. If no user is retrieved, return an instance of AnonymousUser.
Function get​_user​_model Return the User model that is active in this project.
Function login Persist a user id and a backend in the request. This way a user doesn't have to reauthenticate on every request. Note that data set during the anonymous session is retained when the user logs in.
Function logout Remove the authenticated user's ID from the request and flush their session data.
Function update​_session​_auth​_hash Updating a user's password logs out all sessions for the user.
Constant BACKEND​_SESSION​_KEY Undocumented
Constant HASH​_SESSION​_KEY Undocumented
Constant REDIRECT​_FIELD​_NAME Undocumented
Constant SESSION​_KEY Undocumented
Function ​_clean​_credentials Clean a dictionary of credentials of potentially sensitive info before sending to less secure functions.
Function ​_get​_backends Undocumented
Function ​_get​_user​_session​_key Undocumented
Function get​_backends Undocumented
Function get​_permission​_codename Return the codename of the permission for the specified action.
Function load​_backend Undocumented
SESSION_KEY: str =

Undocumented

Value
'_auth_user_id'
BACKEND_SESSION_KEY: str =

Undocumented

Value
'_auth_user_backend'
HASH_SESSION_KEY: str =

Undocumented

Value
'_auth_user_hash'
REDIRECT_FIELD_NAME: str =

Undocumented

Value
'next'
def load_backend(path):

Undocumented

def _get_backends(return_tuples=False):

Undocumented

def get_backends():

Undocumented

@sensitive_variables('credentials')
def _clean_credentials(credentials):

Clean a dictionary of credentials of potentially sensitive info before sending to less secure functions.

Not comprehensive - intended for user_login_failed signal

def _get_user_session_key(request):

Undocumented

@sensitive_variables('credentials')
def authenticate(request=None, **credentials):
If the given credentials are valid, return a User object.
def login(request, user, backend=None):
Persist a user id and a backend in the request. This way a user doesn't have to reauthenticate on every request. Note that data set during the anonymous session is retained when the user logs in.
def logout(request):
Remove the authenticated user's ID from the request and flush their session data.
def get_user_model():
Return the User model that is active in this project.
def get_user(request):
Return the user model instance associated with the given request session. If no user is retrieved, return an instance of AnonymousUser.
def get_permission_codename(action, opts):
Return the codename of the permission for the specified action.
def update_session_auth_hash(request, user):

Updating a user's password logs out all sessions for the user.

Take the current request and the updated user object from which the new session hash will be derived and update the session hash appropriately to prevent a password change from logging out the session from which the password was changed.