diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php index 2d7a3d33bce76bdd82661075daa1baa059f2954f..8298c4ddc5ac725cbeb8879978804344f3697650 100644 --- a/lib/SimpleSAML/Auth/Default.php +++ b/lib/SimpleSAML/Auth/Default.php @@ -105,20 +105,10 @@ class SimpleSAML_Auth_Default { /** - * Called when logout operation completes. - * - * This function never returns. - * - * @param array $state The state after the logout. + * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML_Auth_Source::logoutCompleted() instead. */ public static function logoutCompleted($state) { - assert('is_array($state)'); - assert('array_key_exists("SimpleSAML_Auth_Default.ReturnURL", $state)'); - - $returnURL = $state['SimpleSAML_Auth_Default.ReturnURL']; - - /* Redirect... */ - \SimpleSAML\Utils\HTTP::redirectTrustedURL($returnURL); + SimpleSAML_Auth_Source::logoutCompleted($state); } diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php index 9009fb1005c1fdd2234185c8595cc4210d0657b7..2ad82a72552c1395309459866b06766d45c2c53d 100644 --- a/lib/SimpleSAML/Auth/Source.php +++ b/lib/SimpleSAML/Auth/Source.php @@ -247,6 +247,22 @@ abstract class SimpleSAML_Auth_Source } + /** + * Called when logout operation completes. + * + * This function never returns. + * + * @param array $state The state after the logout. + */ + public static function logoutCompleted($state) + { + assert('is_array($state)'); + assert('array_key_exists("SimpleSAML_Auth_Default.ReturnURL", $state)'); + + \SimpleSAML\Utils\HTTP::redirectTrustedURL($state['SimpleSAML_Auth_Default.ReturnURL']); + } + + /** * Complete logout. *