Fakultas Ilmu Komputer UI

Commit 2d54a773 authored by Kefas Satrio Bangkit Solideantyo's avatar Kefas Satrio Bangkit Solideantyo
Browse files

[CHORES] add permission AllowAny and increase token lifetime

parent 6bf91940
Pipeline #72458 passed with stage
in 6 minutes and 8 seconds
......@@ -11,11 +11,11 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
from datetime import timedelta
import os
import environ
import dj_database_url
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
......@@ -71,9 +71,17 @@ INSTALLED_APPS = [
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework_simplejwt.authentication.JWTAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
]
}
SIMPLE_JWT = {
'ACCESS_TOKEN_LIFETIME': timedelta(days=30),
'REFRESH_TOKEN_LIFETIME': timedelta(days=40)
}
SITE_ID = 1
REST_USE_JWT = True
ACCOUNT_AUTHENTICATION_METHOD = 'email'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment