diff options
author | Roland Hedberg <roland.hedberg@adm.umu.se> | 2013-01-25 13:50:00 +0100 |
---|---|---|
committer | Roland Hedberg <roland.hedberg@adm.umu.se> | 2013-01-25 13:50:00 +0100 |
commit | edf1819015ced8c0d56f0037003aec5aaf7cb9af (patch) | |
tree | 246b55253b6283281048fe3c22e9be6ea1f5c6a4 /src/saml2/httpbase.py | |
parent | db681c0841e8106a816f955ff8cfcb834d1afc52 (diff) | |
download | pysaml2-edf1819015ced8c0d56f0037003aec5aaf7cb9af.tar.gz |
Final touch to ECP
Worked through a NameIDMapping test
Diffstat (limited to 'src/saml2/httpbase.py')
-rw-r--r-- | src/saml2/httpbase.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/saml2/httpbase.py b/src/saml2/httpbase.py index 0930083a..4b016472 100644 --- a/src/saml2/httpbase.py +++ b/src/saml2/httpbase.py @@ -7,7 +7,6 @@ import urlparse import requests import time from Cookie import SimpleCookie -from saml2.profile import paos from saml2.time_util import utc_now from saml2 import class_name from saml2.pack import http_form_post_message @@ -262,7 +261,7 @@ class HTTPBase(object): :param request: :param destination: - :param headers: + :param soap_headers: :param sign: :return: dictionary """ @@ -270,7 +269,7 @@ class HTTPBase(object): soap_message = make_soap_enveloped_saml_thingy(request, soap_headers) - logger.error("SOAP message: %s" % soap_message) + logger.debug("SOAP message: %s" % soap_message) if sign and self.sec: _signed = self.sec.sign_statement_using_xmlsec(soap_message, @@ -301,14 +300,11 @@ class HTTPBase(object): logger.info("HTTPClient exception: %s" % (exc,)) raise - if response: - if response.status_code == 200: - logger.info("SOAP response: %s" % response.text) - return response - else: - raise HTTPError("%d:%s" % (response.status_code, response.error)) + if response.status_code == 200: + logger.info("SOAP response: %s" % response.text) + return response else: - return None + raise HTTPError("%d:%s" % (response.status_code, response.error)) def add_credentials(self, user, passwd): self.user = user |