Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.core.auth.middleware¶
Functions
|
|
|
Classes
|
|
|
|
|
Middleware for utilizing Web-server-provided authentication. |
|
- class lino.core.auth.middleware.RemoteUserMiddleware(get_response)¶
Bases:
MiddlewareMixin
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 theheader
attribute if you need to use a different header.- clean_username(username, request)¶
Allows the backend to clean the username, if the backend defines a clean_username method.