summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeppelinux <giuseppe.demarco@unical.it>2020-12-26 15:43:12 +0100
committerpeppelinux <giuseppe.demarco@unical.it>2020-12-26 23:50:18 +0100
commit9b4b70f46ceb67e6e8cccace6d29704d251a785f (patch)
tree024871be90c5b3fa41a4f210d8f66c6f278fd3a0
parentca0696cec41cdf968f5f9417ba8d6ee5406fa114 (diff)
downloadpysaml2-9b4b70f46ceb67e6e8cccace6d29704d251a785f.tar.gz
Fixes https://github.com/IdentityPython/pysaml2/issues/599
The SP authnReq now works with a 3-tuple (URL+binding+index) ACS service conf
-rw-r--r--src/saml2/config.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/saml2/config.py b/src/saml2/config.py
index 8b865dcb..6687a60f 100644
--- a/src/saml2/config.py
+++ b/src/saml2/config.py
@@ -404,7 +404,12 @@ class Config(object):
if endps and service in endps:
for endpspec in endps[service]:
try:
- endp, bind = endpspec
+ # endspec sometime is str, sometime is a tuple
+ if type(endpspec) in (tuple, list):
+ # slice prevents 3-tuple, eg: sp's assertion_consumer_service
+ endp, bind = endpspec[0:2]
+ else:
+ endp, bind = endpspec
if binding is None or bind == binding:
spec.append(endp)
except ValueError: