Add auth hook settings and apiKey query support

This commit is contained in:
Cristi Vîjdea
2018-10-14 17:38:39 +03:00
parent 5d8c936956
commit 060fe1881a
7 changed files with 206 additions and 31 deletions
+8
View File
@@ -95,6 +95,9 @@ REST_FRAMEWORK = {
SWAGGER_SETTINGS = {
'LOGIN_URL': reverse_lazy('admin:login'),
'LOGOUT_URL': '/admin/logout',
'PERSIST_AUTH': True,
'REFETCH_SCHEMA_WITH_AUTH': True,
'REFETCH_SCHEMA_ON_LOGOUT': True,
'DEFAULT_INFO': 'testproj.urls.swagger_info',
@@ -106,6 +109,11 @@ SWAGGER_SETTINGS = {
'type': 'apiKey',
'name': 'Authorization',
'in': 'header'
},
'Query': {
'type': 'apiKey',
'name': 'auth',
'in': 'query'
}
}
}