當前位置: 首頁>>代碼示例>>Python>>正文


Python views.ProxyView類代碼示例

本文整理匯總了Python中mama_cas.views.ProxyView的典型用法代碼示例。如果您正苦於以下問題:Python ProxyView類的具體用法?Python ProxyView怎麽用?Python ProxyView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ProxyView類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_proxy_view_invalid_service_url

 def test_proxy_view_invalid_service_url(self):
     """
     When called with an invalid service identifier, a proxy
     authentication failure should be returned.
     """
     request = self.rf.get(reverse('cas_proxy'), {'targetService': self.url2, 'pgt': self.pgt.ticket})
     response = ProxyView.as_view()(request)
     self.assertContains(response, 'INVALID_SERVICE')
開發者ID:alvinyao,項目名稱:django-mama-cas,代碼行數:8,代碼來源:test_views.py

示例2: test_proxy_view_no_service

 def test_proxy_view_no_service(self):
     """
     When called with no service identifier, a validation failure
     should be returned.
     """
     request = self.rf.get(reverse('cas_proxy'), {'pgt': self.pgt.ticket})
     response = ProxyView.as_view()(request)
     self.assertContains(response, 'INVALID_REQUEST')
開發者ID:alvinyao,項目名稱:django-mama-cas,代碼行數:8,代碼來源:test_views.py

示例3: test_proxy_view_success

 def test_proxy_view_success(self):
     """
     When called with valid parameters, a validation success
     should be returned.
     """
     request = self.rf.get(reverse('cas_proxy'), {'targetService': self.url, 'pgt': self.pgt.ticket})
     response = ProxyView.as_view()(request)
     self.assertContains(response, 'proxyTicket')
開發者ID:alvinyao,項目名稱:django-mama-cas,代碼行數:8,代碼來源:test_views.py

示例4: test_proxy_view

 def test_proxy_view(self):
     """
     When called with no parameters, a validation failure should be
     returned.
     """
     request = self.rf.get(reverse('cas_proxy'))
     response = ProxyView.as_view()(request)
     self.assertContains(response, 'INVALID_REQUEST')
開發者ID:alvinyao,項目名稱:django-mama-cas,代碼行數:8,代碼來源:test_views.py

示例5: test_proxy_view_invalid_ticket

 def test_proxy_view_invalid_ticket(self):
     """
     When the provided ticket cannot be found, a validation failure
     should be returned.
     """
     pgt_str = ProxyTicket.objects.create_ticket_str()
     request = self.rf.get(reverse('cas_proxy'), {'targetService': self.url, 'pgt': pgt_str})
     response = ProxyView.as_view()(request)
     self.assertContains(response, 'BAD_PGT')
開發者ID:alvinyao,項目名稱:django-mama-cas,代碼行數:9,代碼來源:test_views.py

示例6: url

        LoginView.as_view(),
        name='cas_login'),
    url(r'^logout/?$',
        LogoutView.as_view(),
        name='cas_logout'),
    url(r'^validate/?$',
        ValidateView.as_view(),
        name='cas_validate'),
    url(r'^serviceValidate/?$',
        ServiceValidateView.as_view(),
        name='cas_service_validate'),
    url(r'^proxyValidate/?$',
        ProxyValidateView.as_view(),
        name='cas_proxy_validate'),
    url(r'^proxy/?$',
        ProxyView.as_view(),
        name='cas_proxy'),
    url(r'^p3/serviceValidate/?$',
        ServiceValidateView.as_view(),
        name='cas_p3_service_validate'),
    url(r'^p3/proxyValidate/?$',
        ProxyValidateView.as_view(),
        name='cas_p3_proxy_validate'),
    url(r'^warn/?$',
        WarnView.as_view(),
        name='cas_warn'),
    url(r'^samlValidate/?$',
        SamlValidateView.as_view(),
        name='cas_saml_validate'),
)
開發者ID:davinirjr,項目名稱:django-mama-cas,代碼行數:30,代碼來源:urls.py

示例7: url

"""
(2) CAS server URIs as described in the CAS protocol.
"""

from django.conf.urls import url

from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.views import ProxyValidateView
from mama_cas.views import ProxyView
from mama_cas.views import WarnView
from mama_cas.views import SamlValidateView


urlpatterns = [
    url(r'^login/?$', LoginView.as_view(), name='cas_login'),
    url(r'^logout/?$', LogoutView.as_view(), name='cas_logout'),
    url(r'^validate/?$', ValidateView.as_view(), name='cas_validate'),
    url(r'^serviceValidate/?$', ServiceValidateView.as_view(), name='cas_service_validate'),
    url(r'^proxyValidate/?$', ProxyValidateView.as_view(), name='cas_proxy_validate'),
    url(r'^proxy/?$', ProxyView.as_view(), name='cas_proxy'),
    url(r'^p3/serviceValidate/?$', ServiceValidateView.as_view(), name='cas_p3_service_validate'),
    url(r'^p3/proxyValidate/?$', ProxyValidateView.as_view(), name='cas_p3_proxy_validate'),
    url(r'^warn/?$', WarnView.as_view(), name='cas_warn'),
    url(r'^samlValidate/?$', SamlValidateView.as_view(), name='cas_saml_validate'),
]
開發者ID:adiletmaratov,項目名稱:django-mama-cas,代碼行數:28,代碼來源:urls.py

示例8: patterns

"""
URLconf for CAS server URIs as described in the CAS protocol.
"""

from django.conf.urls import patterns
from django.conf.urls import url

from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.views import ProxyValidateView
from mama_cas.views import ProxyView
from mama_cas.views import WarnView


urlpatterns = patterns(
    "",
    url(r"^login/?$", LoginView.as_view(), name="cas_login"),
    url(r"^logout/?$", LogoutView.as_view(), name="cas_logout"),
    url(r"^validate/?$", ValidateView.as_view(), name="cas_validate"),
    url(r"^serviceValidate/?$", ServiceValidateView.as_view(), name="cas_service_validate"),
    url(r"^proxyValidate/?$", ProxyValidateView.as_view(), name="cas_proxy_validate"),
    url(r"^proxy/?$", ProxyView.as_view(), name="cas_proxy"),
    url(r"^warn/?$", WarnView.as_view(), name="cas_warn"),
)
開發者ID:bryankaplan,項目名稱:django-mama-cas,代碼行數:26,代碼來源:urls.py


注:本文中的mama_cas.views.ProxyView類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。