kop narsalar qoshildi

This commit is contained in:
behruz-dev
2025-11-21 19:17:04 +05:00
parent cb0cdfde26
commit 6d8f5e3fec
42 changed files with 595 additions and 16 deletions

2
config/conf/__init__.py Normal file
View File

@@ -0,0 +1,2 @@
from .rest_framework import *
from .simple_jwt import *

View File

@@ -0,0 +1,7 @@
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
'rest_framework_simplejwt.authentication.JWTAuthentication',
],
}

10
config/conf/simple_jwt.py Normal file
View File

@@ -0,0 +1,10 @@
from datetime import timedelta
SIMPLE_JWT = {
"ACCESS_TOKEN_LIFETIME": timedelta(days=10),
"REFRESH_TOKEN_LIFETIME": timedelta(days=365),
"ROTATE_REFRESH_TOKENS": True,
"BLACKLIST_AFTER_ROTATION": True,
"UPDATE_LAST_LOGIN": True,
}