Skip to content

Commit

Permalink
Repositioned comments above the code in settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yunho7687 committed Jul 28, 2024
1 parent f157613 commit 64e3a02
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions server/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,26 @@
}

SIMPLE_JWT = {
"ACCESS_TOKEN_LIFETIME": timedelta(hours=5),
# Short-term access token lifetime
"REFRESH_TOKEN_LIFETIME": timedelta(days=7),
"ACCESS_TOKEN_LIFETIME": timedelta(hours=5),
# Long-term refresh token lifetime
"ROTATE_REFRESH_TOKENS": True,
"REFRESH_TOKEN_LIFETIME": timedelta(days=7),
# Rotate refresh tokens
"BLACKLIST_AFTER_ROTATION": True,
"ROTATE_REFRESH_TOKENS": True,
# Blacklist old tokens after rotation
"ALGORITHM": "HS256",
"BLACKLIST_AFTER_ROTATION": True,
# Signing algorithm
"SIGNING_KEY": SECRET_KEY,
"ALGORITHM": "HS256",
# Secret key for signing tokens
"AUTH_HEADER_TYPES": ("Bearer",),
"SIGNING_KEY": SECRET_KEY,
# Authentication header type
"AUTH_HEADER_NAME": "HTTP_AUTHORIZATION",
"AUTH_HEADER_TYPES": ("Bearer",),
# Authentication header name
"USER_ID_FIELD": "user_id",
"AUTH_HEADER_NAME": "HTTP_AUTHORIZATION",
# User ID field
"USER_ID_CLAIM": "user_id",
"USER_ID_FIELD": "user_id",
# User ID claim in the token
"USER_ID_CLAIM": "user_id",
}

MIDDLEWARE = [
Expand Down

0 comments on commit 64e3a02

Please sign in to comment.