From 647177ae56eda4cf92aae2098170b396a6663d5c Mon Sep 17 00:00:00 2001 From: ybkang1108 Date: Wed, 14 Aug 2024 23:06:30 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20jwt=20=EC=97=90=EB=9F=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mustgou/settings.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mustgou/settings.py b/mustgou/settings.py index 7c096a8..2b28887 100644 --- a/mustgou/settings.py +++ b/mustgou/settings.py @@ -119,18 +119,16 @@ REST_FRAMEWORK = { "DEFAULT_AUTHENTICATION_CLASSES": ( - "rest_framework_jwt.authentication.JSONWebTokenAuthentication", + "rest_framework_simplejwt.authentication.JWTAuthentication", ), "DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",), } -JWT_AUTH = { - "JWT_SECRET_KEY": SECRET_KEY, - "JWT_ALGORITHM": "HS256", - "JWT_ALLOW_REFRESH": True, - "JWT_EXPIRATION_DELTA": datetime.timedelta(days=365), - "JWT_REFRESH_EXPIRATION_DELTA": datetime.timedelta(days=730), +SIMPLE_JWT = { + "ACCESS_TOKEN_LIFETIME": datetime.timedelta(days=30), + "REFRESH_TOKEN_LIFETIME": datetime.timedelta(days=365), + "SIGNING_KEY": config("SECRET_KEY"), }