mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-16 11:12:21 +03:00
Merge pull request #5000 from jpadilla/issue-4994
Correctly set scheme in coreapi TokenAuthentication
This commit is contained in:
commit
9a8d29e784
|
@ -163,7 +163,7 @@ $('form.api-interaction').submit(function(event) {
|
||||||
if (window.auth && window.auth.type === 'token') {
|
if (window.auth && window.auth.type === 'token') {
|
||||||
// Header authentication
|
// Header authentication
|
||||||
options.auth = new coreapi.auth.TokenAuthentication({
|
options.auth = new coreapi.auth.TokenAuthentication({
|
||||||
prefix: window.auth.scheme,
|
scheme: window.auth.scheme,
|
||||||
token: window.auth.token
|
token: window.auth.token
|
||||||
})
|
})
|
||||||
} else if (window.auth && window.auth.type === 'basic') {
|
} else if (window.auth && window.auth.type === 'basic') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user