Фикс аутентификации и сваггера

main
through-your-tears 9 months ago
parent d6625c8780
commit 7cb59138d5

@ -154,6 +154,33 @@ REST_FRAMEWORK = {
),
}
SWAGGER_SETTINGS = {
'DEFAULT_AUTHENTICATION': 'authorization.backends.JWTAuthentication',
'SECURITY_DEFINITIONS': {
'Token': {
'type': 'apiKey',
'in': 'header',
'name': 'Authorization'
}
},
}
# access token lifetime
ACCESS_TOKEN_LIFETIME = {
'seconds': 0,
'minutes': 0,
'hours': 0,
'days': 7
}
# refresh token lifetime
REFRESH_TOKEN_LIFETIME = {
'seconds': 0,
'minutes': 0,
'hours': 0,
'days': 30
}
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",

Loading…
Cancel
Save