2016-07-03 16:11:48 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2015-05-27 20:10:06 +00:00
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for
|
|
|
|
# more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version 3
|
|
|
|
# along with this program; if not, write to the Free Software Foundation, Inc., 51
|
|
|
|
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
2016-06-30 22:00:53 +00:00
|
|
|
# (c) 2015-2016 Valentin Samir
|
2015-05-27 19:56:39 +00:00
|
|
|
"""urls for the app"""
|
2020-12-22 22:07:33 +00:00
|
|
|
|
|
|
|
import django
|
|
|
|
|
|
|
|
if django.VERSION < (2,):
|
|
|
|
from django.conf.urls import url
|
|
|
|
re_path = url
|
|
|
|
else:
|
|
|
|
from django.urls import re_path
|
|
|
|
|
|
|
|
|
2016-07-23 16:47:52 +00:00
|
|
|
from django.conf.urls import url
|
2015-05-16 21:43:46 +00:00
|
|
|
from django.views.generic import RedirectView
|
2016-04-28 17:33:46 +00:00
|
|
|
from django.views.decorators.debug import sensitive_post_parameters, sensitive_variables
|
2015-05-16 21:43:46 +00:00
|
|
|
|
2016-06-24 21:37:24 +00:00
|
|
|
from cas_server import views
|
2015-05-16 21:43:46 +00:00
|
|
|
|
2016-07-29 11:56:23 +00:00
|
|
|
app_name = "cas_server"
|
|
|
|
|
2016-07-23 16:47:52 +00:00
|
|
|
urlpatterns = [
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path(
|
2018-05-21 11:10:33 +00:00
|
|
|
r'^$',
|
|
|
|
RedirectView.as_view(pattern_name="cas_server:login", permanent=False, query_string=True)
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path(
|
2016-04-28 17:33:46 +00:00
|
|
|
'^login$',
|
|
|
|
sensitive_post_parameters('password')(
|
|
|
|
views.LoginView.as_view()
|
|
|
|
),
|
|
|
|
name='login'
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path('^logout$', views.LogoutView.as_view(), name='logout'),
|
|
|
|
re_path('^validate$', views.Validate.as_view(), name='validate'),
|
|
|
|
re_path(
|
2015-06-12 16:10:52 +00:00
|
|
|
'^serviceValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=False),
|
|
|
|
name='serviceValidate'
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path(
|
2015-06-12 16:10:52 +00:00
|
|
|
'^proxyValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=True),
|
|
|
|
name='proxyValidate'
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path('^proxy$', views.Proxy.as_view(), name='proxy'),
|
|
|
|
re_path(
|
2015-06-12 16:10:52 +00:00
|
|
|
'^p3/serviceValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=False),
|
|
|
|
name='p3_serviceValidate'
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path(
|
2015-06-12 16:10:52 +00:00
|
|
|
'^p3/proxyValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=True),
|
|
|
|
name='p3_proxyValidate'
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path('^samlValidate$', views.SamlValidate.as_view(), name='samlValidate'),
|
|
|
|
re_path(
|
2016-04-28 17:33:46 +00:00
|
|
|
'^auth$',
|
2016-07-31 10:28:10 +00:00
|
|
|
sensitive_variables('password', 'secret')(
|
|
|
|
sensitive_post_parameters('password', 'secret')(
|
2016-04-28 17:33:46 +00:00
|
|
|
views.Auth.as_view()
|
|
|
|
)
|
|
|
|
),
|
|
|
|
name='auth'
|
|
|
|
),
|
2020-12-22 22:07:33 +00:00
|
|
|
re_path("^federate(?:/(?P<provider>([^/]+)))?$",
|
|
|
|
views.FederateAuth.as_view(), name='federateAuth'),
|
2016-07-23 16:47:52 +00:00
|
|
|
]
|