MCPcopy
hub / github.com/encode/django-rest-framework / _not_authenticated

Method _not_authenticated

rest_framework/request.py:397–413  ·  view source on GitHub ↗

Set authenticator, user & authtoken representing an unauthenticated request. Defaults are None, AnonymousUser & None.

(self)

Source from the content-addressed store, hash-verified

395 self._not_authenticated()
396
397 def _not_authenticated(self):
398 """
399 Set authenticator, user & authtoken representing an unauthenticated request.
400
401 Defaults are None, AnonymousUser & None.
402 """
403 self._authenticator = None
404
405 if api_settings.UNAUTHENTICATED_USER:
406 self.user = api_settings.UNAUTHENTICATED_USER()
407 else:
408 self.user = None
409
410 if api_settings.UNAUTHENTICATED_TOKEN:
411 self.auth = api_settings.UNAUTHENTICATED_TOKEN()
412 else:
413 self.auth = None
414
415 def __getattr__(self, attr):
416 """

Callers 1

_authenticateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected