mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Try to get WWW-Authenticate header from all authentication classes instead of only the first one (fixes #4680)
This commit is contained in:
parent
45e90c3398
commit
6a8116af1a
|
@ -182,7 +182,11 @@ class APIView(View):
|
|||
"""
|
||||
authenticators = self.get_authenticators()
|
||||
if authenticators:
|
||||
return authenticators[0].authenticate_header(request)
|
||||
for authenticator in authenticators:
|
||||
authenticate_header = authenticator.authenticate_header(request)
|
||||
if authenticate_header:
|
||||
return authenticate_header
|
||||
return None
|
||||
|
||||
def get_parser_context(self, http_request):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user