class documentation
class RemoteUserMiddleware(MiddlewareMixin): (source)
Known subclasses: django.contrib.auth.middleware.PersistentRemoteUserMiddleware
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 |
Allow the backend to clean the username, if the backend defines a clean_username method. |
Method | process |
Undocumented |
Class Variable | force |
Undocumented |
Class Variable | header |
Undocumented |
Method | _remove |
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 |
Undocumented |
Class Variable | sync |
Undocumented |
Instance Variable | get |
Undocumented |
Method | _async |
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 |
Undocumented |