c836f642fa
This avoid the weird double username situation where we want to give the users the choice of their displayed name but at the same time we need them to never change their CAS username. Now CAS matches on email so we do not have problems.
29 lines
1 KiB
Python
29 lines
1 KiB
Python
from django.urls import include, path
|
|
import django.contrib.auth.views as dj_auth_views
|
|
from .views import LoginView, LogoutView, PasswordChangeView, AccountSettingsView
|
|
import django_cas_ng.views
|
|
|
|
app_name = "accounts"
|
|
|
|
cas_patterns = [
|
|
path("login/", django_cas_ng.views.LoginView.as_view(), name="cas_ng_login"),
|
|
path("logout/", django_cas_ng.views.LogoutView.as_view(), name="cas_ng_logout"),
|
|
path(
|
|
"callback/",
|
|
django_cas_ng.views.CallbackView.as_view(),
|
|
name="cas_ng_proxy_callback",
|
|
),
|
|
]
|
|
|
|
accounts_patterns = [
|
|
path("cas/", include(cas_patterns)),
|
|
path("login/", LoginView.as_view(), name="login"),
|
|
path("logout/", LogoutView.as_view(), name="logout"),
|
|
path("password_login/", dj_auth_views.LoginView.as_view(), name="password_login"),
|
|
path("change_password/", PasswordChangeView.as_view(), name="change_password"),
|
|
path("settings/", AccountSettingsView.as_view(), name="account_settings"),
|
|
]
|
|
|
|
urlpatterns = [
|
|
path("", include(accounts_patterns)),
|
|
]
|