diff options
author | Egor Panfilov <edpanfilov@sbcloud.ru> | 2018-11-19 18:23:17 +0300 |
---|---|---|
committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2018-11-19 19:07:23 +0200 |
commit | 3a514b4cbebcf207f4b9dc29fee1f425572aca79 (patch) | |
tree | 8cfb2e421d285c97140ca6b34f330761b1245e19 /src/saml2/ecp_client.py | |
parent | a8c6320095a73c61353b6c10df60cf3688dfedd3 (diff) | |
download | pysaml2-3a514b4cbebcf207f4b9dc29fee1f425572aca79.tar.gz |
Various small refactor
Diffstat (limited to 'src/saml2/ecp_client.py')
-rw-r--r-- | src/saml2/ecp_client.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/saml2/ecp_client.py b/src/saml2/ecp_client.py index 788d252d..f0183f45 100644 --- a/src/saml2/ecp_client.py +++ b/src/saml2/ecp_client.py @@ -33,6 +33,12 @@ logger = logging.getLogger(__name__) class Client(Entity): + """ECP-aware client that works on the client (application) side. + + You can use this class when you want to login user through + ECP-aware SP and IdP. + """ + def __init__(self, user, passwd, sp="", idp=None, metadata_file=None, xmlsec_binary=None, verbose=0, ca_certs="", disable_ssl_certificate_validation=True, key_file=None, @@ -221,7 +227,8 @@ class Client(Entity): return None - def add_paos_headers(self, headers=None): + @staticmethod + def add_paos_headers(headers=None): if headers: headers = set_list2dict(headers) headers["PAOS"] = PAOS_HEADER_INFO @@ -283,7 +290,7 @@ class Client(Entity): # should by now be authenticated so this should go smoothly response = self.send(url, op, **opargs) except (soap.XmlParseError, AssertionError, KeyError): - pass + raise if response.status_code >= 400: raise SAMLError("Error performing operation: %s" % ( |