summaryrefslogtreecommitdiff
path: root/src/saml2/ecp.py
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2013-04-15 10:56:49 +0200
committerRoland Hedberg <roland.hedberg@adm.umu.se>2013-04-15 10:56:49 +0200
commit02aa4ec9888704b1f5aa69602854eae4241e0236 (patch)
tree3d773225e5f323dbfd5bad0ee449af55a9da7845 /src/saml2/ecp.py
parent72eaa68eb7cb63694227c6ac4c679683b2aef0c7 (diff)
downloadpysaml2-02aa4ec9888704b1f5aa69602854eae4241e0236.tar.gz
Editorial
Diffstat (limited to 'src/saml2/ecp.py')
-rw-r--r--src/saml2/ecp.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/saml2/ecp.py b/src/saml2/ecp.py
index 1dcf9705..dcbb26c4 100644
--- a/src/saml2/ecp.py
+++ b/src/saml2/ecp.py
@@ -19,6 +19,8 @@
Contains classes used in the SAML ECP profile
"""
import logging
+from saml2.client_base import ACTOR
+from saml2.ecp_client import SERVICE
from saml2 import element_to_extension_element
from saml2 import samlp
@@ -70,7 +72,7 @@ def ecp_auth_request(cls, entityid=None, relay_state="", sign=False):
#
paos_request = paos.Request(must_understand="1", actor=ACTOR,
response_consumer_url=my_url,
- service = SERVICE)
+ service=SERVICE)
eelist.append(element_to_extension_element(paos_request))
@@ -86,10 +88,11 @@ def ecp_auth_request(cls, entityid=None, relay_state="", sign=False):
#
# idp_list = samlp.IDPList(idp_entry= [idp])
#
-# ecp_request = ecp.Request(actor = ACTOR, must_understand = "1",
-# provider_name = "Example Service Provider",
-# issuer=saml.Issuer(text="https://sp.example.org/entity"),
-# idp_list = idp_list)
+# ecp_request = ecp.Request(
+# actor = ACTOR, must_understand = "1",
+# provider_name = "Example Service Provider",
+# issuer=saml.Issuer(text="https://sp.example.org/entity"),
+# idp_list = idp_list)
#
# eelist.append(element_to_extension_element(ecp_request))
@@ -130,14 +133,11 @@ def ecp_auth_request(cls, entityid=None, relay_state="", sign=False):
def handle_ecp_authn_response(cls, soap_message, outstanding=None):
rdict = soap.class_instances_from_soap_enveloped_saml_thingies(
- soap_message,
- [paos, ecp,
- samlp])
+ soap_message, [paos, ecp, samlp])
_relay_state = None
for item in rdict["header"]:
- if item.c_tag == "RelayState" and \
- item.c_namespace == ecp.NAMESPACE:
+ if item.c_tag == "RelayState" and item.c_namespace == ecp.NAMESPACE:
_relay_state = item
response = authn_response(cls.config, cls.service_url(), outstanding,
@@ -171,6 +171,7 @@ def ecp_response(target_url, response):
return "%s" % soap_envelope
+
class ECPServer(Server):
""" This deals with what the IdP has to do