Coverage for authentication\urls.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-10-13 15:18 +0200

1""" 

2Configuration des URLs de l'authentification. 

3 

4Ce module définit toutes les routes liées à l'authentification : 

5- Inscription des clients et employés 

6- Connexion avec JWT 

7- Rafraîchissement des tokens 

8""" 

9 

10from django.urls import path 

11from authentication.views.client import ClientRegisterView 

12from authentication.views.employe import EmployeeRegisterView 

13from rest_framework_simplejwt.views import TokenRefreshView 

14from authentication.views.token import CustomTokenObtainPairView 

15 

16urlpatterns = [ 

17 # Inscription des utilisateurs 

18 path('register/client/', ClientRegisterView.as_view(), name='register-client'), 

19 path('register/employe/', EmployeeRegisterView.as_view(), name='register-employe'), 

20 

21 # Authentification JWT 

22 path('login/', CustomTokenObtainPairView.as_view(), name='login'), 

23 path('refresh/', TokenRefreshView.as_view(), name='refresh'), 

24]