From 51e6a5a6d8ecb953b71fd64d83b87f7c2e1de315 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Tue, 24 May 2011 08:04:33 +0000
Subject: [PATCH] LogoutIFrame: Add logout state parameter to skip the logout
 type question.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2849 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/IdP/LogoutIFrame.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/SimpleSAML/IdP/LogoutIFrame.php b/lib/SimpleSAML/IdP/LogoutIFrame.php
index a50467510..94124cb39 100644
--- a/lib/SimpleSAML/IdP/LogoutIFrame.php
+++ b/lib/SimpleSAML/IdP/LogoutIFrame.php
@@ -41,8 +41,14 @@ class SimpleSAML_IdP_LogoutIFrame extends SimpleSAML_IdP_LogoutHandler {
 			$state['core:Logout-IFrame:From'] = NULL;
 		}
 
-		$id = SimpleSAML_Auth_State::saveState($state, 'core:Logout-IFrame');
-		$url = SimpleSAML_Module::getModuleURL('core/idp/logout-iframe.php', array('id' => $id));
+		$params = array(
+			'id' => SimpleSAML_Auth_State::saveState($state, 'core:Logout-IFrame'),
+		);
+		if (isset($state['core:Logout-IFrame:InitType'])) {
+			$params['type'] = $state['core:Logout-IFrame:InitType'];
+		}
+
+		$url = SimpleSAML_Module::getModuleURL('core/idp/logout-iframe.php', $params);
 		SimpleSAML_Utilities::redirect($url);
 	}
 
-- 
GitLab