django-rest-swagger
django-rest-swagger copied to clipboard
Swagger not setting token in Authorization header
Hello, I just added swagger to my API and am wondering what I can change to stop getting 401's in every request I make through this interface.
I'm logging in successfully with DRF's basic login window.
Here are my SWAGGER_SETTINGS:
SWAGGER_SETTINGS = { 'JSON_EDITOR': True, 'USE_SESSION_AUTH': True, 'SECURITY_DEFINITIONS': { 'api_key': { 'type': 'apiKey', 'name': 'Authorization', 'in': 'header', } }, }
This is the response:
{"detail":"Authentication credentials were not provided."}
django-rest-swagger version: 2.2.0
I hope it's enough details. Thanks in advance!
I had same question.If you know, can you tell me the answer?
Same as #759 ?