mirror of
https://github.com/andwati/store-api.git
synced 2026-10-18 09:22:53 +00:00
completed swagger settings
This commit is contained in:
@@ -63,6 +63,18 @@ INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
|
||||
# JWT settings
|
||||
JWT_SECRET_KEY = os.environ.get("JWT_SECRET_KEY")
|
||||
|
||||
# Swagger ui settings
|
||||
SWAGGER_SETTINGS = {
|
||||
"SECURITY_DEFINITIONS": {
|
||||
"Auth Token [Bearer (JWT)]": {"type": "apiKey", "name": "Authorization", "in": "header"},
|
||||
},
|
||||
}
|
||||
|
||||
# Rest framework settings
|
||||
REST_FRAMEWORK = {
|
||||
"DEFAULT_AUTHENTICATION_CLASSES": ("authentication.backends.JWTAuthentication",),
|
||||
}
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
|
||||
Reference in New Issue
Block a user