Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -*- coding: utf-8 -*- 

2# This program is distributed in the hope that it will be useful, but WITHOUT 

3# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 

4# FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for 

5# more details. 

6# 

7# You should have received a copy of the GNU General Public License version 3 

8# along with this program; if not, write to the Free Software Foundation, Inc., 51 

9# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 

10# 

11# (c) 2015-2016 Valentin Samir 

12"""urls for the app""" 

13 

14try: 

15 from django.urls import re_path 

16except ImportError: 

17 # re_path is not available in Django 2 

18 from django.conf.urls import url as re_path 

19 

20from django.views.generic import RedirectView 

21from django.views.decorators.debug import sensitive_post_parameters, sensitive_variables 

22 

23from cas_server import views 

24 

25app_name = "cas_server" 

26 

27urlpatterns = [ 

28 re_path( 

29 r'^$', 

30 RedirectView.as_view(pattern_name="cas_server:login", permanent=False, query_string=True) 

31 ), 

32 re_path( 

33 '^login$', 

34 sensitive_post_parameters('password')( 

35 views.LoginView.as_view() 

36 ), 

37 name='login' 

38 ), 

39 re_path('^logout$', views.LogoutView.as_view(), name='logout'), 

40 re_path('^validate$', views.Validate.as_view(), name='validate'), 

41 re_path( 

42 '^serviceValidate$', 

43 views.ValidateService.as_view(allow_proxy_ticket=False), 

44 name='serviceValidate' 

45 ), 

46 re_path( 

47 '^proxyValidate$', 

48 views.ValidateService.as_view(allow_proxy_ticket=True), 

49 name='proxyValidate' 

50 ), 

51 re_path('^proxy$', views.Proxy.as_view(), name='proxy'), 

52 re_path( 

53 '^p3/serviceValidate$', 

54 views.ValidateService.as_view(allow_proxy_ticket=False), 

55 name='p3_serviceValidate' 

56 ), 

57 re_path( 

58 '^p3/proxyValidate$', 

59 views.ValidateService.as_view(allow_proxy_ticket=True), 

60 name='p3_proxyValidate' 

61 ), 

62 re_path('^samlValidate$', views.SamlValidate.as_view(), name='samlValidate'), 

63 re_path( 

64 '^auth$', 

65 sensitive_variables('password', 'secret')( 

66 sensitive_post_parameters('password', 'secret')( 

67 views.Auth.as_view() 

68 ) 

69 ), 

70 name='auth' 

71 ), 

72 re_path("^federate(?:/(?P<provider>([^/]+)))?$", 

73 views.FederateAuth.as_view(), name='federateAuth'), 

74]