from django.urls import path from rest_auth.views import LogoutView, PasswordChangeView from .views import SigningView, Login, Register urlpatterns = [ path('login', Login.as_view(), name='rest_login'), path('signing', SigningView.as_view(), name='signing'), path('register', Register.as_view(), name='rest_register'), path('logout', LogoutView.as_view(), name='rest_logout'), path('password/change', PasswordChangeView.as_view(), name='rest_password_change'), ]
# -*- coding: utf-8 -*- # author: itimor from django.conf.urls import url, include from rest_framework import routers from rest_auth.views import PasswordChangeView from rest_framework_jwt.views import obtain_jwt_token as jwt_token from systems.views import UserViewSet, RoleViewSet, MenuViewSet, ApiPermViewSet, AuthViewSet router = routers.DefaultRouter() router.register(r'user', UserViewSet) router.register(r'role', RoleViewSet) router.register(r'menu', MenuViewSet) router.register(r'apiperm', ApiPermViewSet) router.register(r'auth', AuthViewSet) urlpatterns = [ url(r'^auth/changepwd/', PasswordChangeView.as_view(), name='changepwd'), # token认证 url(r'^auth/jwt-token-auth/', jwt_token, name='rest_framework_token'), url(r'^auth/api-token-auth/', include('rest_framework.urls', namespace='rest_framework')), ] urlpatterns += router.urls
TokenSessionLogoutView, UserViewSet, ValidateUsername, ) router = DefaultRouter() router.register("users", UserViewSet) app_name = "auth" urlpatterns = [ path("", include(router.urls)), path("register/", RegisterView.as_view(), name="register"), path("login/", LoginView.as_view(), name="login"), # path("logout/", LogoutView.as_view()), path("logout/", TokenSessionLogoutView.as_view(), name="logout"), path( "user/validate_username/", ValidateUsername.as_view(), name="validate_username" ), path("user/", UserAPI.as_view(), name="user"), path("password/change/", PasswordChangeView.as_view(), name="password_change"), path("password/reset/", PasswordResetView.as_view(), name="password_reset"), re_path( r"^password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$", PasswordResetConfirmView.as_view(), name="password_reset_confirm", ), path("", include("rest_auth.urls")), path("", include("knox.urls")), ]
from django.urls import path, include from . import views from django.conf.urls import url from rest_auth.views import PasswordResetView, PasswordChangeView, PasswordResetConfirmView urlpatterns = [ path('register/', views.api_register_view), path('login/', views.UserLoginView.as_view(), name='login'), path('logout/', views.UserLogoutView.as_view(), name='logout'), path('activate/<slug:uidb64>/<slug:token>', views.activate, name='activate'), url('^', include('django.contrib.auth.urls')), path('rest-auth/', PasswordResetView.as_view()), path('rest-auth/', PasswordResetConfirmView.as_view()), path('rest-auth/', PasswordChangeView.as_view()), ]
urlpatterns = [ # enable the admin interface url(r'^admin/', admin.site.urls), url(r'^stats/stacksampler', StackSamplerView.as_view()), url(r'^api/v3/auth/password/reset/confirm/$', PasswordResetConfirmView.as_view(), name='rest_password_reset_confirm'), url(r'^api/v3/auth/login/$', LoginView.as_view(), name='rest_login'), # URLs that require a user to be logged in with a valid session / token. url(r'^api/v3/auth/logout/$', LogoutView.as_view(), name='rest_logout'), url(r'^api/v3/auth/password/change/$', PasswordChangeView.as_view(), name='rest_password_change'), # Rest Auth requires auth urls. If we remove this, then we'll get an error # around NoReverseMatch # TODO: Work out how to avoid external access to these URLs if possible url(r'^', include('django.contrib.auth.urls')), url(r'^api/v3/', include('zconnect.urls')), url(r'^api/v3/', include('zconnect.zc_billing.urls')), url(r'^celerymqtttest/', CeleryMQTTTestViewSet.as_view({'post': 'create'})), # For django-db-file-storage: url(r'^files/', include('db_file_storage.urls')), ]
re_path(r'^rest-auth/password/reset/$', PasswordResetView.as_view(), name='rest_password_reset'), re_path(r'^rest-auth/password/reset/confirm/$', PasswordResetConfirmView.as_view(), name='rest_password_reset_confirm'), re_path(r'^rest-auth/login/$', LoginView.as_view(), name='rest_login'), # URLs that require a user to be logged in with a valid session / token. re_path(r'^rest-auth/logout/$', LogoutView.as_view(), name='rest_logout'), re_path(r'^rest-auth/user/$', UserDetailsView.as_view(), name='rest_user_details'), re_path(r'^rest-auth/password/change/$', PasswordChangeView.as_view(), name='rest_password_change'), ] if settings.DEBUG: urlpatterns += [ path('admin/', admin.site.urls), ] # Add final wildcard route to catch the deep links # into the frontend SPA urlpatterns += [ path('<path:spa_path>', IndexTemplateView.as_view()), # This needs to be below in order to allow for the system to generate # the Password reset confirmation URL re_path(
from rest_auth import urls urlpatterns += [ # API base url path("api/", include("config.api_router")), # DRF auth token path('api/auth-token/', MyTokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/auth-token/refresh/', MyTokenRefreshView.as_view(), name='token_refresh'), path('api/password-change/', PasswordChangeView.as_view(queryset=''), name='password-change'), ] # SWAGGER URLS urlpatterns += [ url(r'^swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'), url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), url(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), ]
class PasswordResetConfirmViewSchema(CustomAutoSchema): request_serializer = PasswordResetConfirmSerializer() response_serializer = RestAuthCommonResponseSerializer() class PasswordChangeViewSchema(CustomAutoSchema): request_serializer = PasswordChangeSerializer() response_serializer = RestAuthCommonResponseSerializer() urlpatterns = [ url(r'^login/$', LoginView.as_view(schema=LoginViewSchema()), name='rest_login'), url(r'^logout/$', LogoutView.as_view(schema=LogoutViewSchema()), name='rest_logout'), url(r'^password/reset/$', PasswordResetView.as_view(schema=PasswordResetViewSchema()), name='rest_password_reset'), url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view( schema=PasswordResetConfirmViewSchema()), name='rest_password_reset_confirm'), url(r'^password/change/$', PasswordChangeView.as_view(schema=PasswordChangeViewSchema()), name='rest_password_change'), ]
from django.conf.urls import patterns, url from rest_auth.views import ( LoginView, LogoutView, UserDetailsView, PasswordChangeView, PasswordResetView, PasswordResetConfirmView, ) urlpatterns = patterns( "", # URLs that do not require a session or valid token url(r"^password/reset", PasswordResetView.as_view(), name="rest_password_reset"), url(r"^confirm/password/reset", PasswordResetConfirmView.as_view()), # url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm'), url( r"^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$", PasswordResetConfirmView.as_view(), name="password_reset_confirm", ), url(r"^login", LoginView.as_view(), name="rest_login"), # URLs that require a user to be logged in with a valid session / token. url(r"^logout", LogoutView.as_view(), name="rest_logout"), url(r"^user/$", UserDetailsView.as_view(), name="rest_user_details"), url(r"^password/change", PasswordChangeView.as_view(), name="rest_password_change"), )
from django.contrib import admin from django.conf.urls import include, url from rest_auth.views import (LoginView,LogoutView,UserDetailsView, PasswordChangeView,PasswordResetView, PasswordResetConfirmView ) from django.views.decorators.csrf import csrf_exempt from django.views.generic import TemplateView, RedirectView # urlpatterns = [ # path('admin/', admin.site.urls), # ] urlpatterns = [ # url(r'^api/', include('rest_auth.urls')) url(r'login/', csrf_exempt(LoginView.as_view()),name='login'), url(r'logout/', LogoutView.as_view(),name='logout'), url(r'user/', UserDetailsView.as_view(),name='user_details'), url(r'password/change/',PasswordChangeView.as_view(),name='password_change'), url(r'password/reset/confirm/',PasswordResetConfirmView.as_view(),name='password_reset_confirm'), url(r'password/reset/',PasswordResetView.as_view(),name='password_reset') ]
from django.urls import path, re_path from rest_auth.views import LogoutView, PasswordChangeView, PasswordResetConfirmView, PasswordResetView from rest_framework_jwt.views import verify_jwt_token, refresh_jwt_token from rest_auth.registration.views import VerifyEmailView from . import views urlpatterns = ( path('signup/', views.SignupAPIView.as_view(), name='account_signup'), re_path(r'^account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'), re_path(r'^account-confirm-email/(?P<key>[-:\w]+)/$', VerifyEmailView.as_view(), name='account_confirm_email'), path('login/', views.CustomLoginView.as_view()), path('logout/', LogoutView.as_view()), path('change-password/', PasswordChangeView.as_view()), path('reset-password/', PasswordResetView.as_view()), path('reset-password/confirm/<str:uidb64>/<str:token>/', PasswordResetConfirmView.as_view()), path('token-verify/', verify_jwt_token), path('token-refresh/', refresh_jwt_token), )
path('api/installed/', InstalledAPIView.as_view()), path('api/setup/install/', InitializeDatabaseAPIView.as_view()), path('api-auth/', include('rest_framework.urls', namespace='rest_framework')) ] # URL for rest-auth urlpatterns += [ # URLs that do not require a session or valid token re_path(r'^rest-auth/password/reset/$', PasswordResetView.as_view(), name='rest_password_reset'), re_path(r'^rest-auth/password/reset/confirm/$', PasswordResetConfirmView.as_view(), name='rest_password_reset_confirm'), re_path(r'^rest-auth/login/$', LoginView.as_view(), name='rest_login'), # URLs that require a user to be logged in with a valid session / token. re_path(r'^rest-auth/logout/$', LogoutView.as_view(), name='rest_logout'), re_path(r'^rest-auth/user/$', UserDetailsView.as_view(), name='rest_user_details'), re_path(r'^rest-auth/password/change/$', PasswordChangeView.as_view(), name='rest_password_change'), ] if settings.DEBUG: urlpatterns += [ path('admin/', admin.site.urls), ] # Add final wildcard route to catch the deep links # into the frontend SPA urlpatterns += [ path('<path:spa_path>', IndexTemplateView.as_view()), # This needs to be below in order to allow for the system to generate # the Password reset confirmation URL re_path(r'^password-reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
from django.conf.urls import url from rest_auth.views import (LoginView, LogoutView, PasswordChangeView) from rest_auth.registration.views import RegisterView from user.views import DeleteUserView urlpatterns = [ url(r'^login$', LoginView.as_view()), url(r'^logout$', LogoutView.as_view()), url(r'^register$', RegisterView.as_view()), url(r'^change_password', PasswordChangeView.as_view()), url(r'^delete_user', DeleteUserView.as_view()) ]
from django.conf import settings as django_settings from .api import * from .views import * from rest_auth.registration.views import RegisterView, VerifyEmailView from rest_auth.views import PasswordChangeView, PasswordResetView, PasswordResetConfirmView router = routers.DefaultRouter() urlpatterns = router.get_urls() + [ path('api/login', LoginView.as_view()), path('api/logout', LogoutView.as_view()), path('api/register', RegisterView.as_view()), path('api/verify-email', VerifyEmailView.as_view()), path('api/user_data', user_data), path('api/settings', change_settings), path('api/change-password', PasswordChangeView.as_view()), path('api/reset-password', PasswordResetView.as_view()), path('api/confirm-password', PasswordResetConfirmView.as_view()), path('api/get-items', get_items), path('api/get-item', get_item), path('api/get-favorites', get_favorites), path('api/add-favorite', add_favorite), path('api/get-suggestions', suggestion), path('api/create_pay', Pay.as_view()), path('pay_notify', pay_notify), path('api/check-payment', check_payment), path('api/pay-order', pay_order), path('api/order-history', get_orders), path('api/ok', ok, name='account_email_verification_sent'), path('api/activate-promocode', activate_promocode), path('api/check-delivery-price', check_delivery_cost),
import qabel_provider.monitoring rest_auth_register_urls = [ url(r'^$', views.PasswordPolicyRegisterView.as_view(), name='rest_register'), url(r'^verify-email/$', VerifyEmailView.as_view(), name='rest_verify_email'), ] rest_auth_urls = [ url(r'^password/reset/$', PasswordResetView.as_view(), name='rest_password_reset'), url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(), name='rest_password_reset_confirm'), url(r'^login/$', views.ThrottledLoginView.as_view(), name='rest_login'), url(r'^logout/$', LogoutView.as_view(), name='rest_logout'), url(r'^user/$', UserDetailsView.as_view(), name='rest_user_details'), url(r'^password/change/$', PasswordChangeView.as_view(), name='rest_password_change'), ] rest_urls = [ url(r'^$', views.api_root, name='api-root'), url(r'^auth/', include(rest_auth_urls)), url(r'^auth/registration/', include(registration_urls)), url(r'^internal/user/$', views.auth_resource, name='api-auth'), url(r'^internal/user/register/$', views.register_on_behalf), url(r'^plan/subscription/$', views.plan_subscription), url(r'^plan/add-interval/$', views.plan_add_interval), ] profile_urls = [
TokenVerifyView ) from django.conf import settings from auth.views import LoginView, LogoutView rest_auth_registration_urls = [ # allauth login/logout/password re_path(r"^registration/$", RegisterView.as_view(), name="account_signup"), re_path(r"^registration/verify-email/$",VerifyEmailView.as_view(),name="rest_verify_email",) ] urlpatterns = [ # rest_auth login/logout/password re_path(r"^login/$", LoginView.as_view(), name="rest_login"), re_path(r"^logout/$", LogoutView.as_view(), name="rest_logout"), re_path(r"^password/reset/$", PasswordResetView.as_view(), name="rest_password_reset"), re_path(r"^password/reset/confirm/$",PasswordResetConfirmView.as_view(),name="rest_password_reset_confirm",), re_path(r"^password/change/$", PasswordChangeView.as_view(), name="rest_password_change" ), #rest_framework_simplejwt re_path(r"^token/obtain/$", TokenObtainPairView.as_view(), name='token_obtain_pair'), re_path(r"^token/refresh/$", TokenRefreshView.as_view(), name='token_refresh'), re_path(r"^token/verify/$", TokenVerifyView.as_view(), name='token_verify'), ] if settings.AUTH_ALLOW_REGISTRATION: urlpatterns += rest_auth_registration_urls
from django.urls import path, include from rest_framework import routers from . import views from rest_auth.views import (LogoutView, UserDetailsView, PasswordChangeView, PasswordResetView, PasswordResetConfirmView) urlpatterns = [ path('login', views.LoginView.as_view(), name='login-url'), path('google_login', views.GoogleLoginView.as_view()), path('password/reset', PasswordResetView.as_view()), path('password/reset/confirm', PasswordResetConfirmView.as_view()), path('logout', LogoutView.as_view()), path('user', UserDetailsView.as_view()), path('password/change', PasswordChangeView.as_view()), ]
from django.contrib import admin from django.urls import path, include from django.conf.urls import url from .views import LoginAPIView, EmailConfirmAPIView, VerifyEmailView from rest_auth.views import (LogoutView, PasswordChangeView, PasswordResetView, PasswordResetConfirmView) app_name = "authentication" urlpatterns = [ path('api/login/', LoginAPIView.as_view(), name='account_login'), path('api/logout/', LogoutView.as_view(), name='account_logout'), path('api/u/change_password', PasswordChangeView.as_view(), name='password_change_view'), path('api/u/reset_passowrd', PasswordResetView.as_view(), name='password_reset_view'), path('api/u/reset_confirm', PasswordResetConfirmView.as_view(), name='password_reset_confirm_view'), path('api/u/verify_email', VerifyEmailView.as_view(), name='account_verify'), url('confirm_email/(?P<key>[-:\w]+)/$', EmailConfirmAPIView.as_view(), name='account_confirm_email') ]
# -*- coding: utf-8 -*- # author: timor from django.conf.urls import url, include from django.conf.urls.static import static from rest_auth.views import PasswordChangeView from rest_framework_jwt.views import obtain_jwt_token from django.views.generic.base import TemplateView from omsBackend import settings from omsBackend.routerApi import router urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \ [ url(r'^api/', include(router.urls)), # 用户认证 url(r'^api/changepasswd/', PasswordChangeView.as_view(), name='changepasswd'), url(r'^api/api-token-auth/', obtain_jwt_token, name='rest_framework_token'), url(r'^api/api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'', TemplateView.as_view(template_name="index.html")), ]
# re-written from rest_auth.urls because of cache validation # URLs that do not require a session or valid token url(r'^password/reset/$', cache_page(0)(PasswordResetView.as_view()), name='rest_password_reset'), url(r'^password/reset/confirm/$', cache_page(0)(PasswordResetConfirmView.as_view()), name='rest_password_reset_confirm'), url(r'^login/$', cache_page(0)(LoginView.as_view()), name='rest_login'), # URLs that require a user to be logged in with a valid session / token. url(r'^logout/$', cache_page(0)(LogoutView.as_view()), name='rest_logout'), url(r'^user/$', cache_page(0)(UserDetailsView.as_view()), name='rest_user_details'), url(r'^password/change/$', cache_page(0)(PasswordChangeView.as_view()), name='rest_password_change'), ) apipatterns = ( url(r'^$', login_required(cache_page(60 * 60)(APIRoot.as_view())), name='root_listing'), # url(r'^explore/', include('rest_framework_swagger.urls', # namespace='swagger')), url(r'^common/', include('common.urls', namespace='common')), url(r'^users/', include('users.urls', namespace='users')), url(r'^facilities/', include('facilities.urls', namespace='facilities')), url(r'^chul/', include('chul.urls', namespace='chul')), url(r'^gis/', include('mfl_gis.urls', namespace='mfl_gis')), url(r'^reporting/', include('reporting.urls', namespace='reporting')),