Skip to content

Commit 39a29be

Browse files
Merge pull request #394 from DataShades/redirect-logout-requests
Correctly pull the SAMLRequest from Redirect LogoutRequests
2 parents 606060f + 6f1d6f5 commit 39a29be

File tree

1 file changed

+5
-1
lines changed
  • src/saml2/s2repoze/plugins

1 file changed

+5
-1
lines changed

src/saml2/s2repoze/plugins/sp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,13 @@ def identify(self, environ):
484484

485485
if logout and "SAMLRequest" in post:
486486
print("logout request received")
487+
if binding == BINDING_HTTP_REDIRECT:
488+
saml_request = post["SAMLRequest"]
489+
else:
490+
saml_request = post["SAMLRequest"][0]
487491
try:
488492
response = self.saml_client.handle_logout_request(
489-
post["SAMLRequest"][0],
493+
saml_request,
490494
self.saml_client.users.subjects()[0], binding)
491495
environ['samlsp.pending'] = self._handle_logout(response)
492496
return {}

0 commit comments

Comments
 (0)