Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Backend
Commits
2d54a773
Commit
2d54a773
authored
Apr 25, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dietela_backend/settings.py
View file @
2d54a773
...
...
@@ -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'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment