2016-11-16 10:12:14 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# ~*~ coding: utf-8 ~*~
|
|
|
|
#
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2018-07-27 10:56:40 +00:00
|
|
|
from django.urls import path
|
2016-11-16 10:12:14 +00:00
|
|
|
from rest_framework_bulk.routes import BulkRouter
|
2019-02-28 03:58:48 +00:00
|
|
|
|
|
|
|
from authentication import api as auth_api
|
2016-11-16 10:12:14 +00:00
|
|
|
from .. import api
|
|
|
|
|
|
|
|
app_name = 'users'
|
|
|
|
|
|
|
|
router = BulkRouter()
|
2018-07-13 16:47:21 +00:00
|
|
|
router.register(r'users', api.UserViewSet, 'user')
|
|
|
|
router.register(r'groups', api.UserGroupViewSet, 'user-group')
|
2016-11-16 10:12:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
2019-02-28 03:58:48 +00:00
|
|
|
path('connection-token/', auth_api.UserConnectionTokenApi.as_view(),
|
|
|
|
name='connection-token'),
|
|
|
|
path('auth/', auth_api.UserAuthApi.as_view(), name='user-auth'),
|
|
|
|
path('otp/auth/', auth_api.UserOtpAuthApi.as_view(), name='user-otp-auth'),
|
|
|
|
|
2018-09-03 03:24:25 +00:00
|
|
|
path('profile/', api.UserProfileApi.as_view(), name='user-profile'),
|
|
|
|
path('otp/reset/', api.UserResetOTPApi.as_view(), name='my-otp-reset'),
|
|
|
|
path('users/<uuid:pk>/otp/reset/', api.UserResetOTPApi.as_view(), name='user-reset-otp'),
|
|
|
|
path('users/<uuid:pk>/password/', api.UserChangePasswordApi.as_view(), name='change-user-password'),
|
2018-07-27 10:56:40 +00:00
|
|
|
path('users/<uuid:pk>/password/reset/', api.UserResetPasswordApi.as_view(), name='user-reset-password'),
|
|
|
|
path('users/<uuid:pk>/pubkey/reset/', api.UserResetPKApi.as_view(), name='user-public-key-reset'),
|
|
|
|
path('users/<uuid:pk>/pubkey/update/', api.UserUpdatePKApi.as_view(), name='user-public-key-update'),
|
|
|
|
path('users/<uuid:pk>/unblock/', api.UserUnblockPKApi.as_view(), name='user-unblock'),
|
|
|
|
path('users/<uuid:pk>/groups/', api.UserUpdateGroupApi.as_view(), name='user-update-group'),
|
|
|
|
path('groups/<uuid:pk>/users/', api.UserGroupUpdateUserApi.as_view(), name='user-group-update-user'),
|
2016-11-16 10:12:14 +00:00
|
|
|
]
|
|
|
|
urlpatterns += router.urls
|
2018-11-23 02:25:35 +00:00
|
|
|
|
|
|
|
|