mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Fixed JWT token lifetime
This commit is contained in:
parent
1beaf909f0
commit
194e33db61
2 changed files with 25 additions and 3 deletions
|
@ -10,6 +10,7 @@ For the full list of settings and their values, see
|
||||||
https://docs.djangoproject.com/en/4.2/ref/settings/
|
https://docs.djangoproject.com/en/4.2/ref/settings/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from datetime import timedelta
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from dotenv import load_dotenv # Python dotenv
|
from dotenv import load_dotenv # Python dotenv
|
||||||
import os
|
import os
|
||||||
|
@ -235,9 +236,10 @@ else:
|
||||||
|
|
||||||
SITE_NAME = 'Stud-E'
|
SITE_NAME = 'Stud-E'
|
||||||
|
|
||||||
JWT_TOKEN_LIFETIME = 10800
|
SIMPLE_JWT = {
|
||||||
ACCESS_TOKEN_LIFETIME = JWT_TOKEN_LIFETIME
|
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=360),
|
||||||
REFRESH_TOKEN_LIFETIME = 24 * JWT_TOKEN_LIFETIME
|
"REFRESH_TOKEN_LIFETIME": timedelta(minutes=360)
|
||||||
|
}
|
||||||
|
|
||||||
LEAFLET_CONFIG = {
|
LEAFLET_CONFIG = {
|
||||||
'DEFAULT_CENTER': (8.48567, 124.65642),
|
'DEFAULT_CENTER': (8.48567, 124.65642),
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Generated by Django 4.2.3 on 2023-07-28 16:53
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('courses', '0001_initial'),
|
||||||
|
('year_levels', '0001_initial'),
|
||||||
|
('semesters', '0001_initial'),
|
||||||
|
('subjects', '0002_alter_subject_code'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='subject',
|
||||||
|
unique_together={('name', 'course', 'year_level', 'semester')},
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in a new issue