from . import views urlpatterns = [ re_path(r'^sys/users/$', views.UserList.as_view(), name='index'), re_path(r'^sys/users/create/$', views.UserCreate.as_view(), name='create'), re_path(r'^sys/users/(?P<slug>[\w.@+-]+)/edit/$', non_admin_view(views.UserUpdate.as_view()), name='edit'), re_path(r'^sys/users/(?P<slug>[\w.@+-]+)/delete/$', views.UserDelete.as_view(), name='delete'), re_path(r'^sys/users/(?P<slug>[\w.@+-]+)/change_password/$', non_admin_view(views.UserChangePassword.as_view()), name='change_password'), # Authnz is handled by SSO # XXX: Use axes authentication backend and middleware instead of # axes_dispatch after axes 5.x becomes available in Debian stable. re_path(r'^accounts/login/$', public(axes_dispatch(SSOLoginView.as_view())), name='login'), re_path(r'^accounts/logout/$', public(logout), name='logout'), re_path(r'^users/firstboot/$', public(views.FirstBootView.as_view()), name='firstboot'), re_path(r'accounts/login/locked/$', public(CaptchaLoginView.as_view()), name='locked_out'), ]
def test_axes_dispatch_locks_out(self, _, __): response = axes_dispatch(self.func)(self.request) self.assertEqual(response.content, self.LOCKOUT_RESPONSE.content)
def test_axes_dispatch_dispatches(self, _, __): response = axes_dispatch(self.func)(self.request) self.assertEqual(response.content, self.SUCCESS_RESPONSE.content)
from django.conf.urls import url from django.urls import reverse_lazy from axes.decorators import axes_dispatch from plinth.modules.sso.views import SSOLoginView, SSOLogoutView from plinth.utils import non_admin_view from stronghold.decorators import public from . import views urlpatterns = [ url(r'^sys/users/$', views.UserList.as_view(), name='index'), url(r'^sys/users/create/$', views.UserCreate.as_view(), name='create'), url(r'^sys/users/(?P<slug>[\w.@+-]+)/edit/$', non_admin_view(views.UserUpdate.as_view()), name='edit'), url(r'^sys/users/(?P<slug>[\w.@+-]+)/delete/$', views.UserDelete.as_view(), name='delete'), url(r'^sys/users/(?P<slug>[\w.@+-]+)/change_password/$', non_admin_view(views.UserChangePassword.as_view()), name='change_password'), # Authnz is handled by SSO url(r'^accounts/login/$', public(axes_dispatch(SSOLoginView.as_view())), name='login'), url(r'^accounts/logout/$', non_admin_view(SSOLogoutView.as_view()), {'next_page': reverse_lazy('index')}, name='logout'), url(r'^users/firstboot/$', public(views.FirstBootView.as_view()), name='firstboot'), ]
from axes.decorators import axes_dispatch from django.conf.urls import url from sso.localauth import views urlpatterns = [ url(r'^login/$', axes_dispatch(views.LoginView.as_view()), name='login'), url(r'^logout/$', views.session_logout, name='session-logout'), ]
from axes.decorators import axes_dispatch from django.urls import path from sso.localauth import views urlpatterns = [ path("login/", axes_dispatch(views.LoginView.as_view()), name="login"), path("logout/", views.LogoutView.as_view(), name="session-logout"), ]
name='register_complete'), path('register-sinscrire/activate-activer/<activation_token>/', views.register_activate, name='register_activate'), path('termsofuse/', views.terms_of_use, name='terms_of_use'), path('securitypages-pagessurlasecurite/<page_action>/', views.security_pages, name='security_pages'), path('securitypages-pagessurlasecurite/', views.security_pages, name='security_pages'), path('securityquestions-questionsdesecurite/', views.set_security_question, name='set-questions'), path('login-ouverturedesession/', axes_dispatch( PleioLoginView.as_view(redirect_authenticated_user=True)), name='login'), path('logout/', views.logout, name='logout'), path('profile-profil/', views.profile, name='profile'), path('accept_previous_logins/<acceptation_token>/', views.accept_previous_login, name='accept_previous_login'), path('account/sessions/other/delete/', view=PleioSessionDeleteOtherView.as_view(), name='session_delete_other'), path('account/sessions/<pk>/delete/', view=PleioSessionDeleteView.as_view(), name='session_delete'), path('oauth/v2/authorize', oauth2_views.AuthorizationView.as_view(), name='authorize'),