class documentation

class RemoteUserBackend(ModelBackend):

Known subclasses: django.contrib.auth.backends.AllowAllUsersRemoteUserBackend

View In Hierarchy

This backend is to be used in conjunction with the RemoteUserMiddleware found in the middleware module of this package, and is used when the server is handling authentication outside of Django.

By default, the authenticate method creates User objects for usernames that don't already exist in the database. Subclasses can disable this behavior by setting the create_unknown_user attribute to False.

Method authenticate The username passed as remote_user is considered trusted. Return the User object with the given username. Create a new User object if create_unknown_user is True.
Method clean​_username Perform any cleaning on the "username" prior to using it to get or create the user object. Return the cleaned username.
Method configure​_user Configure a user after creation and return the updated user.
Class Variable create​_unknown​_user Undocumented

Inherited from ModelBackend:

Method get​_all​_permissions Undocumented
Method get​_group​_permissions Return a set of permission strings the user user_obj has from the groups they belong.
Method get​_user​_permissions Return a set of permission strings the user user_obj has from their user_permissions.
Method has​_module​_perms Return True if user_obj has any permissions in the given app_label.
Method has​_perm Undocumented
Method user​_can​_authenticate Reject users with is_active=False. Custom user models that don't have that attribute are allowed.
Method with​_perm Return users that have permission "perm". By default, filter out inactive users and include superusers.
Method ​_get​_group​_permissions Undocumented
Method ​_get​_permissions Return the permissions of user_obj from from_name. from_name can be either "group" or "user" to return permissions from _get_group_permissions or _get_user_permissions respectively.
Method ​_get​_user​_permissions Undocumented
Method get​_user Undocumented
def authenticate(self, request, remote_user):

The username passed as remote_user is considered trusted. Return the User object with the given username. Create a new User object if create_unknown_user is True.

Return None if create_unknown_user is False and a User object with the given username is not found in the database.

def clean_username(self, username):

Perform any cleaning on the "username" prior to using it to get or create the user object. Return the cleaned username.

By default, return the username unchanged.

def configure_user(self, request, user):

Configure a user after creation and return the updated user.

By default, return the user unmodified.

create_unknown_user: bool =

Undocumented