MCPcopy Create free account
hub / github.com/encode/django-rest-framework / get_authenticate_header

Method get_authenticate_header

rest_framework/views.py:189–196  ·  view source on GitHub ↗

If a request is unauthenticated, determine the WWW-Authenticate header to use for 401 responses, if any.

(self, request)

Source from the content-addressed store, hash-verified

187 raise exceptions.Throttled(wait)
188
189 def get_authenticate_header(self, request):
190 """
191 If a request is unauthenticated, determine the WWW-Authenticate
192 header to use for 401 responses, if any.
193 """
194 authenticators = self.get_authenticators()
195 if authenticators:
196 return authenticators[0].authenticate_header(request)
197
198 def get_parser_context(self, http_request):
199 """

Callers 1

handle_exceptionMethod · 0.95

Calls 2

get_authenticatorsMethod · 0.95
authenticate_headerMethod · 0.45

Tested by

no test coverage detected