Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API documentation token authentication scheme error #4994

Closed
eamigo86 opened this issue Mar 16, 2017 · 6 comments · Fixed by #5000
Closed

API documentation token authentication scheme error #4994

eamigo86 opened this issue Mar 16, 2017 · 6 comments · Fixed by #5000
Labels
Milestone

Comments

@eamigo86
Copy link

I am starting to test the new built-in DRF functionality: API documentation, and I have encountered the following error.
Token authentication scheme request always send 'Bearer' word.
Ex:
image

Result:
image

@jpadilla
Copy link
Member

@eamigo86 can you check what window.auth returns in the dev console?

@eamigo86
Copy link
Author

eamigo86 commented Mar 16, 2017

windows.auth returns the correct value:

image

By the way, I'm using:
Django=1.9
rest-framework=3.6.2

@hyyan112
Copy link

same issue I met

@tomchristie
Copy link
Member

Which browser, operating system, and REST framework versions are you both using @eamigo86, @leafyongzhong?

@tomchristie tomchristie added this to the 3.6.3 Release milestone Mar 17, 2017
@eamigo86
Copy link
Author

Chrome 56.0.2924.87
Windows 10
django 1.9
rest-framework 3.6.2

By the way, the error is in the file: "static/rest_framework/js/coreapi-0.1.0.js" line 118:
this.scheme = options.prefix || 'Bearer';
instead of :
this.scheme = options.scheme || 'Bearer';

The options object does not have a sheme attribute.

@tomchristie
Copy link
Member

By the way, the error is in the file: "static/rest_framework/js/coreapi-0.1.0.js" line 118:

That sounds promising, yes. Care to issue a pull request that I can then review.
Failing that will pick this up myself.

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

Successfully merging a pull request may close this issue.

4 participants