This repository was archived by the owner on Jan 11, 2021. It is now read-only.
This repository was archived by the owner on Jan 11, 2021. It is now read-only.
Swagger not setting token in Authorization header #810
Open
Description
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!
Metadata
Metadata
Assignees
Labels
No labels