From 083857963b45ccf0b0d347d2f8ba96b21962c2ef Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 3 Dec 2009 13:24:10 +0000
Subject: [PATCH] Auth_Default: Add initLogoutReturn().

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2019 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Auth/Default.php | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php
index cdffbc5aa..74ec80da4 100644
--- a/lib/SimpleSAML/Auth/Default.php
+++ b/lib/SimpleSAML/Auth/Default.php
@@ -103,11 +103,11 @@ class SimpleSAML_Auth_Default {
 	 * Start logout.
 	 *
 	 * This function starts a logout operation from the current authentication source. This function
-	 * never returns.
+	 * will return if the logout operation does not require a redirect.
 	 *
 	 * @param string $returnURL  The URL we should redirect the user to after logging out.
 	 */
-	public static function initLogout($returnURL) {
+	public static function initLogoutReturn($returnURL) {
 		assert('is_string($returnURL)');
 
 		$session = SimpleSAML_Session::getInstance();
@@ -126,6 +126,21 @@ class SimpleSAML_Auth_Default {
 		}
 
 		$as->logout($state);
+	}
+
+
+	/**
+	 * Start logout.
+	 *
+	 * This function starts a logout operation from the current authentication source. This function
+	 * never returns.
+	 *
+	 * @param string $returnURL  The URL we should redirect the user to after logging out.
+	 */
+	public static function initLogout($returnURL) {
+		assert('is_string($returnURL)');
+
+		self::initLogoutReturn($returnURL);
 		self::logoutCompleted($state);
 	}
 
-- 
GitLab