Skip to content

Commit

Permalink
♻️Refact : 사용자 로그인 API를 simplejwt TokenObtainPairView 로 변경 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Chestnut90 committed Nov 15, 2023
1 parent a4791ed commit 678224a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,7 @@
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"


# Rest Framework
REST_FRAMEWORK = {"DEFAULT_AUTHENTICATION_CLASSES": ("rest_framework_simplejwt.authentication.JWTAuthentication",)}
5 changes: 3 additions & 2 deletions src/users/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from django.urls import path
from rest_framework_simplejwt.views import TokenObtainPairView

from users.views import SignInAPIView, SignUpAPIView
from users.views import SignUpAPIView

urlpatterns = [
path("signup/", view=SignUpAPIView.as_view(), name="signup"),
path("signin/", view=SignInAPIView.as_view(), name="signin"),
path("signin/", view=TokenObtainPairView.as_view(), name="signin"),
]

0 comments on commit 678224a

Please sign in to comment.