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')
|
2019-12-16 08:53:29 +00:00
|
|
|
router.register(r'users-groups-relations', api.UserUserGroupRelationViewSet, 'users-groups-relation')
|
2021-01-20 10:33:38 +00:00
|
|
|
router.register(r'service-account-registrations', api.ServiceAccountRegistrationViewSet, 'service-account-registration')
|
2022-07-11 10:09:06 +00:00
|
|
|
router.register(r'connection-token', auth_api.ConnectionTokenViewSet, 'connection-token')
|
2016-11-16 10:12:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
2018-09-03 03:24:25 +00:00
|
|
|
path('profile/', api.UserProfileApi.as_view(), name='user-profile'),
|
2020-05-28 08:10:28 +00:00
|
|
|
path('profile/password/', api.UserPasswordApi.as_view(), name='user-password'),
|
2021-12-03 07:50:04 +00:00
|
|
|
path('profile/secret-key/', api.UserSecretKeyApi.as_view(), name='user-secret-key'),
|
2020-05-28 08:10:28 +00:00
|
|
|
path('profile/public-key/', api.UserPublicKeyApi.as_view(), name='user-public-key'),
|
2021-11-15 06:27:11 +00:00
|
|
|
path('profile/mfa/reset/', api.UserResetMFAApi.as_view(), name='my-mfa-reset'),
|
|
|
|
path('users/<uuid:pk>/mfa/reset/', api.UserResetMFAApi.as_view(), name='user-reset-mfa'),
|
2018-09-03 03:24:25 +00:00
|
|
|
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>/unblock/', api.UserUnblockPKApi.as_view(), name='user-unblock'),
|
2016-11-16 10:12:14 +00:00
|
|
|
]
|
|
|
|
urlpatterns += router.urls
|
2018-11-23 02:25:35 +00:00
|
|
|
|
|
|
|
|