summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Gregson <mark.gregson@linkdigital.com.au>2017-03-07 15:48:25 +1100
committerGitHub <noreply@github.com>2017-03-07 15:48:25 +1100
commitc5da9786b4eb43536a62b99a7e36388775b6aa70 (patch)
tree4c7cae8def0418e77d9435ad72a53b0ab9f9c446
parenta0c510af7aa620a4c500d538bed44995084f389f (diff)
parentc0a7cfbacbc9a0ec6408466dcda84d906fc81f48 (diff)
downloadpysaml2-c5da9786b4eb43536a62b99a7e36388775b6aa70.tar.gz
Merge pull request #1 from DataShades/redirect-logout-requests
Correctly pull the SAMLRequest from Redirect LogoutRequests
-rw-r--r--src/saml2/s2repoze/plugins/sp.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/saml2/s2repoze/plugins/sp.py b/src/saml2/s2repoze/plugins/sp.py
index 7ae7b20a..59453d95 100644
--- a/src/saml2/s2repoze/plugins/sp.py
+++ b/src/saml2/s2repoze/plugins/sp.py
@@ -484,9 +484,13 @@ class SAML2Plugin(object):
if logout and "SAMLRequest" in post:
print("logout request received")
+ if binding == BINDING_HTTP_REDIRECT:
+ saml_request = post["SAMLRequest"]
+ else:
+ saml_request = post["SAMLRequest"][0]
try:
response = self.saml_client.handle_logout_request(
- post["SAMLRequest"][0],
+ saml_request,
self.saml_client.users.subjects()[0], binding)
environ['samlsp.pending'] = self._handle_logout(response)
return {}