MCPcopy
hub / github.com/django/django / get_username

Method get_username

django/contrib/auth/middleware.py:240–246  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

238 return username
239
240 def get_username(self, request):
241 if (
242 isinstance(request, ASGIRequest)
243 and self.header == RemoteUserMiddleware.header
244 ):
245 return request.META["HTTP_" + self.header]
246 return request.META[self.header]
247
248 def _remove_invalid_user(self, request):
249 """

Callers 2

process_requestMethod · 0.95
aprocess_requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected