2018-11-09 06:54:38 +00:00
|
|
|
# coding:utf-8
|
|
|
|
#
|
|
|
|
|
2019-02-28 03:58:48 +00:00
|
|
|
from django.urls import path, include
|
2021-08-19 07:11:55 +00:00
|
|
|
from django.db.transaction import non_atomic_requests
|
2019-02-27 12:55:28 +00:00
|
|
|
|
2019-02-27 00:45:00 +00:00
|
|
|
from .. import views
|
2020-06-03 03:06:44 +00:00
|
|
|
from users import views as users_view
|
2018-11-09 06:54:38 +00:00
|
|
|
|
|
|
|
app_name = 'authentication'
|
|
|
|
|
|
|
|
urlpatterns = [
|
2019-02-27 12:55:28 +00:00
|
|
|
# login
|
2021-08-19 07:11:55 +00:00
|
|
|
path('login/', non_atomic_requests(views.UserLoginView.as_view()), name='login'),
|
2021-11-10 03:30:48 +00:00
|
|
|
path('login/mfa/', views.UserLoginMFAView.as_view(), name='login-mfa'),
|
2019-10-30 05:18:11 +00:00
|
|
|
path('login/wait-confirm/', views.UserLoginWaitConfirmView.as_view(), name='login-wait-confirm'),
|
|
|
|
path('login/guard/', views.UserLoginGuardView.as_view(), name='login-guard'),
|
2019-02-27 12:55:28 +00:00
|
|
|
path('logout/', views.UserLogoutView.as_view(), name='logout'),
|
2020-03-12 08:24:38 +00:00
|
|
|
|
2020-06-03 03:06:44 +00:00
|
|
|
# 原来在users中的
|
2022-11-14 01:48:55 +00:00
|
|
|
path('password/forget/previewing/', users_view.UserForgotPasswordPreviewingView.as_view(), name='forgot-previewing'),
|
2020-06-03 03:06:44 +00:00
|
|
|
path('password/forgot/', users_view.UserForgotPasswordView.as_view(), name='forgot-password'),
|
|
|
|
path('password/reset/', users_view.UserResetPasswordView.as_view(), name='reset-password'),
|
|
|
|
path('password/verify/', users_view.UserVerifyPasswordView.as_view(), name='user-verify-password'),
|
|
|
|
|
2021-03-24 11:01:35 +00:00
|
|
|
path('wecom/bind/start/', views.WeComEnableStartView.as_view(), name='wecom-bind-start'),
|
|
|
|
path('wecom/qr/bind/', views.WeComQRBindView.as_view(), name='wecom-qr-bind'),
|
|
|
|
path('wecom/qr/login/', views.WeComQRLoginView.as_view(), name='wecom-qr-login'),
|
|
|
|
path('wecom/qr/bind/<uuid:user_id>/callback/', views.WeComQRBindCallbackView.as_view(), name='wecom-qr-bind-callback'),
|
|
|
|
path('wecom/qr/login/callback/', views.WeComQRLoginCallbackView.as_view(), name='wecom-qr-login-callback'),
|
2022-03-29 05:19:13 +00:00
|
|
|
path('wecom/oauth/login/', views.WeComOAuthLoginView.as_view(), name='wecom-oauth-login'),
|
|
|
|
path('wecom/oauth/login/callback/', views.WeComOAuthLoginCallbackView.as_view(), name='wecom-oauth-login-callback'),
|
2021-03-24 11:01:35 +00:00
|
|
|
|
|
|
|
path('dingtalk/bind/start/', views.DingTalkEnableStartView.as_view(), name='dingtalk-bind-start'),
|
|
|
|
path('dingtalk/qr/bind/', views.DingTalkQRBindView.as_view(), name='dingtalk-qr-bind'),
|
|
|
|
path('dingtalk/qr/login/', views.DingTalkQRLoginView.as_view(), name='dingtalk-qr-login'),
|
|
|
|
path('dingtalk/qr/bind/<uuid:user_id>/callback/', views.DingTalkQRBindCallbackView.as_view(), name='dingtalk-qr-bind-callback'),
|
|
|
|
path('dingtalk/qr/login/callback/', views.DingTalkQRLoginCallbackView.as_view(), name='dingtalk-qr-login-callback'),
|
2022-03-29 05:19:13 +00:00
|
|
|
path('dingtalk/oauth/login/', views.DingTalkOAuthLoginView.as_view(), name='dingtalk-oauth-login'),
|
|
|
|
path('dingtalk/oauth/login/callback/', views.DingTalkOAuthLoginCallbackView.as_view(), name='dingtalk-oauth-login-callback'),
|
2021-03-24 11:01:35 +00:00
|
|
|
|
2021-08-12 08:44:06 +00:00
|
|
|
path('feishu/bind/start/', views.FeiShuEnableStartView.as_view(), name='feishu-bind-start'),
|
|
|
|
path('feishu/qr/bind/', views.FeiShuQRBindView.as_view(), name='feishu-qr-bind'),
|
|
|
|
path('feishu/qr/login/', views.FeiShuQRLoginView.as_view(), name='feishu-qr-login'),
|
|
|
|
path('feishu/qr/bind/callback/', views.FeiShuQRBindCallbackView.as_view(), name='feishu-qr-bind-callback'),
|
|
|
|
path('feishu/qr/login/callback/', views.FeiShuQRLoginCallbackView.as_view(), name='feishu-qr-login-callback'),
|
|
|
|
|
2020-06-03 03:06:44 +00:00
|
|
|
# Profile
|
2020-06-03 04:44:45 +00:00
|
|
|
path('profile/pubkey/generate/', users_view.UserPublicKeyGenerateView.as_view(), name='user-pubkey-generate'),
|
2021-11-10 03:30:48 +00:00
|
|
|
path('profile/mfa/', users_view.MFASettingView.as_view(), name='user-mfa-setting'),
|
|
|
|
|
|
|
|
# OTP Setting
|
2020-06-03 03:06:44 +00:00
|
|
|
path('profile/otp/enable/start/', users_view.UserOtpEnableStartView.as_view(), name='user-otp-enable-start'),
|
|
|
|
path('profile/otp/enable/install-app/', users_view.UserOtpEnableInstallAppView.as_view(),
|
|
|
|
name='user-otp-enable-install-app'),
|
|
|
|
path('profile/otp/enable/bind/', users_view.UserOtpEnableBindView.as_view(), name='user-otp-enable-bind'),
|
2021-11-10 03:30:48 +00:00
|
|
|
path('profile/otp/disable/', users_view.UserOtpDisableView.as_view(),
|
|
|
|
name='user-otp-disable'),
|
2020-06-03 03:06:44 +00:00
|
|
|
|
2022-08-04 06:40:33 +00:00
|
|
|
# other authentication protocol
|
2020-03-12 08:24:38 +00:00
|
|
|
path('cas/', include(('authentication.backends.cas.urls', 'authentication'), namespace='cas')),
|
2022-02-25 11:23:59 +00:00
|
|
|
path('openid/', include(('authentication.backends.oidc.urls', 'authentication'), namespace='openid')),
|
2021-12-09 07:47:21 +00:00
|
|
|
path('saml2/', include(('authentication.backends.saml2.urls', 'authentication'), namespace='saml2')),
|
2022-08-04 06:40:33 +00:00
|
|
|
path('oauth2/', include(('authentication.backends.oauth2.urls', 'authentication'), namespace='oauth2')),
|
|
|
|
|
2020-05-27 10:02:18 +00:00
|
|
|
path('captcha/', include('captcha.urls')),
|
2018-11-09 06:54:38 +00:00
|
|
|
]
|