diff options
author | Hans Hörberg <hans.horberg@umu.se> | 2015-11-06 13:01:21 +0100 |
---|---|---|
committer | Hans Hörberg <hans.horberg@umu.se> | 2015-11-06 13:01:21 +0100 |
commit | bc93176fa6b4f15090a7d2d335727d60c6ffe2c3 (patch) | |
tree | 5f5fcc7252eec5520777495c3fc2da45960c967e /src/saml2/client.py | |
parent | 8c901a8f84748a2a2e273a729b16077d8dbcd606 (diff) | |
parent | 31f8ce0e14894252dc9c5b538e1b208ed97233b5 (diff) | |
download | pysaml2-bc93176fa6b4f15090a7d2d335727d60c6ffe2c3.tar.gz |
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# src/saml2/entity.py
digest algorithm added to the same functions as sign alg.
Diffstat (limited to 'src/saml2/client.py')
-rw-r--r-- | src/saml2/client.py | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/saml2/client.py b/src/saml2/client.py index c082a796..54525cbd 100644 --- a/src/saml2/client.py +++ b/src/saml2/client.py @@ -111,7 +111,7 @@ class Saml2Client(Base): continue destination = self._sso_location(entityid, binding) - logger.info("destination to provider: %s" % destination) + logger.info("destination to provider: %s", destination) reqid, request = self.create_authn_request( destination, vorg, scoping, response_binding, nameid_format, @@ -120,7 +120,7 @@ class Saml2Client(Base): _req_str = str(request) - logger.info("AuthNReq: %s" % _req_str) + logger.info("AuthNReq: %s", _req_str) try: sigalg = kwargs["sigalg"] @@ -156,7 +156,7 @@ class Saml2Client(Base): if isinstance(name_id, six.string_types): name_id = decode(name_id) - logger.info("logout request for: %s" % name_id) + logger.info("logout request for: %s", name_id) # find out which IdPs/AAs I should notify entity_ids = self.users.issuers_of_info(name_id) @@ -187,7 +187,7 @@ class Saml2Client(Base): responses = {} for entity_id in entity_ids: - logger.debug("Logout from '%s'" % entity_id) + logger.debug("Logout from '%s'", entity_id) # for all where I can use the SOAP binding, do those first for binding in [BINDING_SOAP, BINDING_HTTP_POST, BINDING_HTTP_REDIRECT]: @@ -201,13 +201,15 @@ class Saml2Client(Base): srvs = None if not srvs: - logger.debug("No SLO '%s' service" % binding) + logger.debug("No SLO '%s' service", binding) continue destination = destinations(srvs)[0] - logger.info("destination to provider: %s" % destination) + logger.info("destination to provider: %s", destination) try: - session_info = self.users.get_info_from(name_id, entity_id) + session_info = self.users.get_info_from(name_id, + entity_id, + False) session_indexes = [session_info['session_index']] except KeyError: session_indexes = None @@ -246,12 +248,12 @@ class Saml2Client(Base): if response and response.status_code == 200: not_done.remove(entity_id) response = response.text - logger.info("Response: %s" % response) + logger.info("Response: %s", response) res = self.parse_logout_request_response(response, binding) responses[entity_id] = res else: - logger.info("NOT OK response from %s" % destination) + logger.info("NOT OK response from %s", destination) else: self.state[req_id] = {"entity_id": entity_id, @@ -298,11 +300,11 @@ class Saml2Client(Base): response message, response headers and message) """ - logger.info("state: %s" % (self.state,)) + logger.info("state: %s", self.state) status = self.state[response.in_response_to] - logger.info("status: %s" % (status,)) + logger.info("status: %s", status) issuer = response.issuer() - logger.info("issuer: %s" % issuer) + logger.info("issuer: %s", issuer) del self.state[response.in_response_to] if status["entity_ids"] == [issuer]: # done self.local_logout(decode(status["name_id"])) @@ -345,10 +347,10 @@ class Saml2Client(Base): if response: # not_done.remove(entity_id) - logger.info("OK response from %s" % destination) + logger.info("OK response from %s", destination) return response else: - logger.info("NOT OK response from %s" % destination) + logger.info("NOT OK response from %s", destination) return None @@ -499,7 +501,7 @@ class Saml2Client(Base): 'method': "POST } """ - logger.info("logout request: %s" % request) + logger.info("logout request: %s", request) _req = self._parse_request(request, LogoutRequest, "single_logout_service", binding) |