factory/apps/auth1/urls.py

14 lines
699 B
Python
Executable File

from django.urls import path
from rest_framework_simplejwt.views import (TokenObtainPairView,
TokenRefreshView)
from apps.auth1.views import LoginView, LogoutView, TokenBlackView
API_BASE_URL = 'api/auth/'
urlpatterns = [
path(API_BASE_URL + 'token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path(API_BASE_URL + 'token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
path(API_BASE_URL + 'token/black/', TokenBlackView.as_view(), name='token_black'),
path(API_BASE_URL + 'login/', LoginView.as_view(), name='session_login'),
path(API_BASE_URL + 'logout/', LogoutView.as_view(), name='session_logout')
]