diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py index 9dcaab4..706faca 100644 --- a/src/saml2/client_base.py +++ b/src/saml2/client_base.py @@ -195,10 +195,10 @@ class Base(Entity): """ return True - def service_url(self, binding=BINDING_HTTP_POST): + def service_urls(self, binding=BINDING_HTTP_POST): _res = self.config.endpoint("assertion_consumer_service", binding, "sp") if _res: - return _res[0] + return _res else: return None @@ -231,9 +231,9 @@ class Base(Entity): args = {} try: - args["assertion_consumer_service_url"] = kwargs[ - "assertion_consumer_service_url"] - del kwargs["assertion_consumer_service_url"] + args["assertion_consumer_service_urls"] = kwargs[ + "assertion_consumer_service_urls"] + del kwargs["assertion_consumer_service_urls"] except KeyError: try: args["attribute_consuming_service_index"] = str(kwargs[ @@ -241,10 +241,10 @@ class Base(Entity): del kwargs["attribute_consuming_service_index"] except KeyError: if service_url_binding is None: - service_url = self.service_url(binding) + service_urls = self.service_urls(binding) else: - service_url = self.service_url(service_url_binding) - args["assertion_consumer_service_url"] = service_url + service_urls = self.service_urls(service_url_binding) + args["assertion_consumer_service_urls"] = service_urls try: args["provider_name"] = kwargs["provider_name"] @@ -508,7 +508,7 @@ class Base(Entity): "outstanding_queries": outstanding, "allow_unsolicited": self.allow_unsolicited, "want_assertions_signed": self.want_assertions_signed, - "return_addr": self.service_url(), + "return_addrs": self.service_urls(), "entity_id": self.config.entityid, "attribute_converters": self.config.attribute_converters, "allow_unknown_attributes": self.config.allow_unknown_attributes, @@ -608,7 +608,7 @@ class Base(Entity): # ---------------------------------------- # # ---------------------------------------- - my_url = self.service_url(BINDING_PAOS) + my_url = self.service_urls(BINDING_PAOS)[0] # must_understand and act according to the standard # diff --git a/src/saml2/request.py b/src/saml2/request.py index 0df0d24..c680434 100644 --- a/src/saml2/request.py +++ b/src/saml2/request.py @@ -77,7 +77,7 @@ class Request(object): assert self.message.version == "2.0" if self.message.destination and \ self.message.destination not in self.receiver_addrs: - logger.error("%s != %s" % (self.message.destination, + logger.error("%s not in %s" % (self.message.destination, self.receiver_addrs)) raise OtherError("Not destined for me!") @@ -232,4 +232,4 @@ SERVICE2REQUEST = { "name_id_mapping_service": NameIDMappingRequest, #"artifact_resolve_service": ArtifactResolve, "single_logout_service": LogoutRequest -} \ No newline at end of file +}