mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
feat: implement custom user model with JWT authentication and registration endpoints
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from django.urls import path
|
||||
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
||||
|
||||
from .views import MeView, RegisterView
|
||||
|
||||
urlpatterns = [
|
||||
path("register/", RegisterView.as_view(), name="register"),
|
||||
# Login and get access and refresh tokens
|
||||
path("login/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
|
||||
# Get a new access token using a refresh token
|
||||
path("refresh/", TokenRefreshView.as_view(), name="token_refresh"),
|
||||
# Get current user info
|
||||
path("me/", MeView.as_view(), name="me"),
|
||||
]
|
||||
Reference in New Issue
Block a user