Class ModelBackend
Authenticates against settings.AUTH_USER_MODEL.
Declaration
source linkDocumentation
Methods
▶ def authenticate(self, request, username=None, password=None, **kwargs) override ▶ def get_group_permissions(self, user_obj, obj=None) override Return a set of permission strings the user `user_obj` has from the groups they belong.
▶ def get_user_permissions(self, user_obj, obj=None) override Return a set of permission strings the user `user_obj` has from their `user_permissions`.
▷ def has_module_perms(self, user_obj, app_label) Return True if user_obj has any permissions in the given app_label.
▶ def has_perm(self, user_obj, perm, obj=None) override ▶ def user_can_authenticate(self, user) Reject users with is_active=False. Custom user models that don't have that attribute are allowed.
Overrides
This method is overriden in:
▷ def with_perm(self, perm, is_active=True, include_superusers=True, obj=None) Return users that have permission "perm". By default, filter out inactive users and include superusers.
Subclasses