class documentation

Middleware for utilizing web-server-provided authentication. If request.user is not authenticated, then this middleware attempts to authenticate the username passed in the ``REMOTE_USER`` request header. If authentication is successful, the user is automatically logged in to persist the user in the session. The header used is configurable and defaults to ``REMOTE_USER``. Subclass this class and change the ``header`` attribute if you need to use a different header.

Method clean_username Allow the backend to clean the username, if the backend defines a clean_username method.
Method process_request Undocumented
Class Variable force_logout_if_no_header Undocumented
Class Variable header Undocumented
Method _remove_invalid_user Remove the current authenticated user in the request which is invalid but only if the user is authenticated via the RemoteUserBackend.

Inherited from MiddlewareMixin:

Async Method __acall__ Async version of __call__ that is swapped in when an async request is running.
Method __call__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Class Variable async_capable Undocumented
Class Variable sync_capable Undocumented
Instance Variable get_response Undocumented
Method _async_check If get_response is a coroutine function, turns us into async mode so a thread is not consumed during a whole request.
Instance Variable _is_coroutine Undocumented
def clean_username(self, username, request): (source)

Allow the backend to clean the username, if the backend defines a clean_username method.

def process_request(self, request): (source)

Undocumented

force_logout_if_no_header: bool = (source)

Undocumented

def _remove_invalid_user(self, request): (source)

Remove the current authenticated user in the request which is invalid but only if the user is authenticated via the RemoteUserBackend.