Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Swagger not setting token in Authorization header #810

Open
yonatanlozinsky opened this issue Aug 19, 2019 · 2 comments
Open

Swagger not setting token in Authorization header #810

yonatanlozinsky opened this issue Aug 19, 2019 · 2 comments

Comments

@yonatanlozinsky
Copy link

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!

@ruanhailiang
Copy link

I had same question.If you know, can you tell me the answer?

@wrvdklooster
Copy link

Same as #759 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants