auth.backends.RemoteUserBackend.configure_user()

RemoteUserBackend.configure_user(user) Configures a newly created user. This method is called immediately after a new user is created, and can be used to perform custom setup actions, such as setting the user’s groups based on attributes in an LDAP directory. Returns the user object.

auth.backends.RemoteUserBackend.clean_username()

RemoteUserBackend.clean_username(username) Performs any cleaning on the username (e.g. stripping LDAP DN information) prior to using it to get or create a User object. Returns the cleaned username.

auth.backends.RemoteUserBackend.authenticate()

RemoteUserBackend.authenticate(remote_user) The username passed as remote_user is considered trusted. This method simply returns the User object with the given username, creating a new User object if create_unknown_user is True. Returns None if create_unknown_user is False and a User object with the given username is not found in the database.

auth.backends.RemoteUserBackend

class RemoteUserBackend Use this backend to take advantage of external-to-Django-handled authentication. It authenticates using usernames passed in request.META['REMOTE_USER']. See the Authenticating against REMOTE_USER documentation. If you need more control, you can create your own authentication backend that inherits from this class and override these attributes or methods:

auth.backends.ModelBackend.user_can_authenticate()

user_can_authenticate() New in Django 1.10. Returns whether the user is allowed to authenticate. To match the behavior of AuthenticationForm which prohibits inactive users from logging in, this method returns False for users with is_active=False. Custom user models that don’t have an is_active field are allowed.

auth.backends.ModelBackend.has_perm()

has_perm(user_obj, perm, obj=None) Uses get_all_permissions() to check if user_obj has the permission string perm. Returns False if the user is not is_active.

auth.backends.ModelBackend.has_module_perms()

has_module_perms(self, user_obj, app_label) Returns whether the user_obj has any permissions on the app app_label.

auth.backends.ModelBackend.get_user_permissions()

get_user_permissions(user_obj, obj=None) Returns the set of permission strings the user_obj has from their own user permissions. Returns an empty set if is_anonymous or is_active is False.

auth.backends.ModelBackend.get_group_permissions()

get_group_permissions(user_obj, obj=None) Returns the set of permission strings the user_obj has from the permissions of the groups they belong. Returns an empty set if is_anonymous or is_active is False.

auth.backends.ModelBackend.get_all_permissions()

get_all_permissions(user_obj, obj=None) Returns the set of permission strings the user_obj has, including both user permissions and group permissions. Returns an empty set if is_anonymous or is_active is False.