mirror of
https://github.com/MOIS3Y/logs-collector.git
synced 2025-02-01 17:30:52 +01:00
41 lines
812 B
Python
41 lines
812 B
Python
|
from django.conf import settings
|
||
|
from django.urls import path
|
||
|
from django.contrib.auth.views import LogoutView
|
||
|
|
||
|
from rest_framework_simplejwt.views import (
|
||
|
TokenObtainPairView,
|
||
|
TokenRefreshView,
|
||
|
TokenVerifyView
|
||
|
)
|
||
|
|
||
|
|
||
|
app_name = 'account'
|
||
|
|
||
|
urlpatterns = [
|
||
|
# WEB LOGOUT:
|
||
|
path(
|
||
|
'accounts/logout/',
|
||
|
LogoutView.as_view(next_page=settings.LOGOUT_REDIRECT_URL),
|
||
|
name='logout'
|
||
|
)
|
||
|
]
|
||
|
|
||
|
urlpatterns += [
|
||
|
# JWT AUTH:
|
||
|
path(
|
||
|
'api/v1/auth/token/',
|
||
|
TokenObtainPairView.as_view(),
|
||
|
name='token_obtain_pair'
|
||
|
),
|
||
|
path(
|
||
|
'api/v1/auth/token/refresh/',
|
||
|
TokenRefreshView.as_view(),
|
||
|
name='token_refresh'
|
||
|
),
|
||
|
path(
|
||
|
'api/v1/auth/token/verify/',
|
||
|
TokenVerifyView.as_view(),
|
||
|
name='token_verify'
|
||
|
),
|
||
|
]
|