jwt token 제어 기능 추가
All checks were successful
Build And Test / build-and-push (push) Successful in 1m48s

This commit is contained in:
2025-05-20 00:47:07 +09:00
parent 23f0642610
commit a1b023cd4e
2 changed files with 11 additions and 12 deletions

View File

@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/4.2/ref/settings/
import os
from dotenv import load_dotenv
from pathlib import Path
from datetime import timedelta
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@ -48,13 +49,15 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# by.sdjo 2025-04-22
# by.sdjo
'rest_framework',
'rest_framework_simplejwt',
'rest_framework_simplejwt.token_blacklist',
'drf_yasg',
'corsheaders',
# create by.sdjo 2025-04-22
'users', # 2025-04-22 custom app create
]
AUTH_USER_MODEL = 'users.CustomUser'
@ -114,16 +117,12 @@ TEMPLATES = [
WSGI_APPLICATION = 'auth_prj.wsgi.application'
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': BASE_DIR / 'db.sqlite3',
# }
# }
SIMPLE_JWT = {
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=5),
"REFRESH_TOKEN_LIFETIME": timedelta(days=1),
"ROTATE_REFRESH_TOKENS": True,
"BLACKLIST_AFTER_ROTATION": True, # 사용한 토큰은 갱신하면 블랙리스트처리됨
}
DATABASES = {
"default": {

View File

@ -1 +1 @@
0.0.6-r1
0.0.7