mirror of
https://github.com/andwati/store-api.git
synced 2026-11-22 16:38:49 +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 settings
|
||||||
JWT_SECRET_KEY = os.environ.get("JWT_SECRET_KEY")
|
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 = [
|
MIDDLEWARE = [
|
||||||
"django.middleware.security.SecurityMiddleware",
|
"django.middleware.security.SecurityMiddleware",
|
||||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
|
|||||||
Reference in New Issue
Block a user