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"), }