from accounts.api import LoginAPI, RegisterAPI, UserAPI from django.urls import path urlpatterns = [ path("login/", LoginAPI.as_view()), path("register/", RegisterAPI.as_view()), path("user/", UserAPI.as_view()) ]
from django.urls import path, include from accounts.api import RegisterAPI, LoginAPI, UserAPI from knox import views as knox_views urlpatterns = [ path('api/auth', include('knox.urls')), path('api/auth/register', RegisterAPI.as_view()), path('api/auth/login', LoginAPI.as_view()), path('api/auth/user', UserAPI.as_view()), path('api/auth/logout', knox_views.LogoutView.as_view(), name='knox_logout') ]
from django.urls import path, include from accounts.api import RegisterAPI, LoginAPI, UserAPI from knox import views as knox_views app_name = 'accounts' urlpatterns = [ path('api/auth', include('knox.urls')), path('api/auth/register', RegisterAPI.as_view(), name='register'), path('api/auth/login', LoginAPI.as_view(), name='login'), path('api/auth/user', UserAPI.as_view(), name='user'), path('api/auth/logout', knox_views.LogoutView.as_view(), name='knox_logout'), ]
from django.urls import re_path from accounts.api import ( RegisterAPI, LoginAPI, UserAPI, LogoutAndBlacklistRefreshTokenForUserView, ) from rest_framework_simplejwt import views as jwt_views urlpatterns = [ re_path(r"^api/auth/register/$", RegisterAPI.as_view()), re_path(r"^api/auth/login/$", LoginAPI.as_view()), re_path(r"^api/auth/user/$", UserAPI.as_view()), re_path( r"^api/auth/token/$", jwt_views.TokenObtainPairView.as_view(), name="token_obtain_pair", ), re_path( r"^api/token/refresh/$", jwt_views.TokenRefreshView.as_view(), name="token_refresh", ), re_path( r"^api/token/verify/$", jwt_views.TokenVerifyView.as_view(), name="token_verify" ), re_path( r"^api/auth/logout/$", LogoutAndBlacklistRefreshTokenForUserView.as_view(), name="blacklist",
from django.urls import path, include from knox import views as knox_views from accounts.api import RegisterAPI, LoginAPI, UserAPI urlpatterns = [ path('knox-auth/', include('knox.urls')), path('auth/register/', RegisterAPI.as_view(), name='accounts-register'), path('auth/login/', LoginAPI.as_view(), name='accounts-login'), path('auth/user/', UserAPI.as_view(), name='accounts-user'), path('auth/logout/', knox_views.LogoutView.as_view(), name='accounts-logout') ]