In this case, however, user is None. My understanding of the documentation is that RemoteUserBackend would take the user's username from request.META["REMOTE_USER"]. However that doesn't seem to be the case. Indeed, the source code doesn't look at request.META["REMOTE_USER"] at all. Instead, it expects that the remote_user argument is passed by the caller.
I've found that when using
RemoteUserBackend
, I need to passremote_user
inauthenticate
to log in my user, i.e.Is this expected behavior?
The documentation for RemoteUserBackend states that it authenticates usernames that are found in
request.META["REMOTE_USER"]
.I was following the documentation to authenticate a user, e.g.
In this case, however,
user
isNone
. My understanding of the documentation is thatRemoteUserBackend
would take the user's username fromrequest.META["REMOTE_USER"]
. However that doesn't seem to be the case. Indeed, the source code doesn't look atrequest.META["REMOTE_USER"]
at all. Instead, it expects that theremote_user
argument is passed by the caller.