Skip to content

Commit

Permalink
Fix AUTH_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSuncatcher222 committed Nov 26, 2023
1 parent 472e210 commit 180798b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/urban_utopia_2024/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
}

if AUTH_TYPE == AUTH_JWT:
if AUTH_TYPE == AUTH_TOKEN:
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = [
'rest_framework.authentication.TokenAuthentication',
]

elif AUTH_TYPE == AUTH_JWT:
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = [
'rest_framework_simplejwt.authentication.JWTAuthentication',
]
Expand Down

0 comments on commit 180798b

Please sign in to comment.