2015-05-16 21:43:46 +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.
|
|
|
|
#
|
|
|
|
# (c) 2015 Valentin Samir
|
2015-05-27 19:56:39 +00:00
|
|
|
"""urls for the app"""
|
2015-05-16 21:43:46 +00:00
|
|
|
from django.conf.urls import patterns, url
|
|
|
|
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
|
|
|
|
2015-05-27 19:56:39 +00:00
|
|
|
urlpatterns = patterns(
|
|
|
|
'',
|
2015-05-30 16:58:58 +00:00
|
|
|
url(r'^$', RedirectView.as_view(pattern_name="cas_server:login")),
|
2016-04-28 17:33:46 +00:00
|
|
|
url(
|
|
|
|
'^login$',
|
|
|
|
sensitive_post_parameters('password')(
|
|
|
|
views.LoginView.as_view()
|
|
|
|
),
|
|
|
|
name='login'
|
|
|
|
),
|
2015-05-29 14:11:10 +00:00
|
|
|
url('^logout$', views.LogoutView.as_view(), name='logout'),
|
2015-05-29 17:27:54 +00:00
|
|
|
url('^validate$', views.Validate.as_view(), name='validate'),
|
2015-06-12 16:10:52 +00:00
|
|
|
url(
|
|
|
|
'^serviceValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=False),
|
|
|
|
name='serviceValidate'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
'^proxyValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=True),
|
|
|
|
name='proxyValidate'
|
|
|
|
),
|
2015-05-29 17:27:54 +00:00
|
|
|
url('^proxy$', views.Proxy.as_view(), name='proxy'),
|
2015-06-12 16:10:52 +00:00
|
|
|
url(
|
|
|
|
'^p3/serviceValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=False),
|
|
|
|
name='p3_serviceValidate'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
'^p3/proxyValidate$',
|
|
|
|
views.ValidateService.as_view(allow_proxy_ticket=True),
|
|
|
|
name='p3_proxyValidate'
|
|
|
|
),
|
2015-05-29 17:27:54 +00:00
|
|
|
url('^samlValidate$', views.SamlValidate.as_view(), name='samlValidate'),
|
2016-04-28 17:33:46 +00:00
|
|
|
url(
|
|
|
|
'^auth$',
|
|
|
|
sensitive_variables('password')(
|
|
|
|
sensitive_post_parameters('password')(
|
|
|
|
views.Auth.as_view()
|
|
|
|
)
|
|
|
|
),
|
|
|
|
name='auth'
|
|
|
|
),
|
2016-06-17 17:28:49 +00:00
|
|
|
url("^federate(?:/(?P<provider>([^/]+)))?$", views.FederateAuth.as_view(), name='federateAuth'),
|
2015-05-16 21:43:46 +00:00
|
|
|
)
|