Private
Public Access
1
0

change API documentation

This commit is contained in:
Sander Roosendaal
2020-10-20 19:39:55 +02:00
parent 25e0badab9
commit 7297675ce8
3 changed files with 34 additions and 10 deletions

View File

@@ -431,7 +431,7 @@ REST_FRAMEWORK = {
# 'rest_framework.permissions.DjangoModelPermissions'
],
'DEFAULT_AUTHENTICATION_CLASSES': (
# 'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.BasicAuthentication',
# 'rest_framework.authentication.SessionAuthentication',
# 'rest_framework.authentication.TokenAuthentication',
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
@@ -441,7 +441,7 @@ REST_FRAMEWORK = {
}
SWAGGER_SETTINGS = {
'SECURITY_DEFINITION': {
'SECURITY_DEFINITIONS': {
'basic': {
'type':'basic'
},
@@ -449,9 +449,16 @@ SWAGGER_SETTINGS = {
'type':'oauth2',
'authorizationUrl':'/rowers/o/authorize',
'flow': 'implicit',
}
},
'api_key': {
'type': 'apiKey',
'in': 'header',
'name': 'Authorization'
},
},
'SHOW_REQUEST_HEADERS': True,
'USE_SESSION_AUTH': True,
'JSON_EDITOR': True,
}
# Analytics