Skip to content

Commit 745c592

Browse files
Merge pull request #757 from peppelinux/authn_3tuple_acs
Handle all types of ACS endpoint specifications
2 parents 6ca05dd + 9b4b70f commit 745c592

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/saml2/config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,12 @@ def endpoint(self, service, binding=None, context=None):
404404
if endps and service in endps:
405405
for endpspec in endps[service]:
406406
try:
407-
endp, bind = endpspec
407+
# endspec sometime is str, sometime is a tuple
408+
if type(endpspec) in (tuple, list):
409+
# slice prevents 3-tuple, eg: sp's assertion_consumer_service
410+
endp, bind = endpspec[0:2]
411+
else:
412+
endp, bind = endpspec
408413
if binding is None or bind == binding:
409414
spec.append(endp)
410415
except ValueError:

0 commit comments

Comments
 (0)