#35971: RemoteUserMiddleware needs a get_username method
-------------------------------+--------------------------------------
Reporter: Adrien Kunysz | Owner: (none)
Type: New feature | Status: closed
Component: contrib.auth | Version: 5.0
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Adrien Kunysz):
Thank you. I don't think your proposal resolves my problem but it gave me
another idea. I can just delete the entry from request.META before calling
the parent __call__. In case anyone else runs into this issue, this is
what I am doing (5.0 has process_request instead of __call__):
{{{
def process_request(self, request):
authenticated = request.META.get("X-Authenticated", "false").lower()
== "true"
if not authenticated and self.header in request.META:
del request.META[self.header]
return super().process_request(request)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35971#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/010701939759c97d-88c94826-1cec-4444-a8e4-2ac19c3afa7d-000000%40eu-central-1.amazonses.com.