mat/backend/apps/authentication/urls.py

14 lines
746 B
Python

from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView
from .views import CustomTokenObtainPairView, UserListView, UserDetailView, current_user, change_password, reset_password
urlpatterns = [
path('login/', CustomTokenObtainPairView.as_view(), name='token_obtain_pair'),
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
path('users/', UserListView.as_view(), name='user-list'),
path('users/<int:pk>/', UserDetailView.as_view(), name='user-detail'),
path('users/<int:pk>/reset-password/', reset_password, name='user-reset-password'),
path('user/', current_user, name='current-user'),
path('user/change-password/', change_password, name='change-password'),
]