diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2015-08-30 20:22:51 +0200 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2015-08-30 20:22:51 +0200 |
commit | 96bb5ad68c7bbd876cc49b41cbcd27045b7c8e46 (patch) | |
tree | 6a23144e41fe27a6b30f7c73c7be51a348d1022e | |
parent | 97547c4a9c8302a222cad8371b0d3f6924ebd35a (diff) | |
download | simplesamlphp-96bb5ad68c7bbd876cc49b41cbcd27045b7c8e46.zip simplesamlphp-96bb5ad68c7bbd876cc49b41cbcd27045b7c8e46.tar.gz simplesamlphp-96bb5ad68c7bbd876cc49b41cbcd27045b7c8e46.tar.bz2 |
Reimplement the old SimpleSAML_Auth_Default::loginCompleted() as a wrapper of the refactored method in SimpleSAML_Auth_Source, now that the latter is public again.
-rw-r--r-- | lib/SimpleSAML/Auth/Default.php | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php index 213ab01..2d7a3d3 100644 --- a/lib/SimpleSAML/Auth/Default.php +++ b/lib/SimpleSAML/Auth/Default.php @@ -36,29 +36,10 @@ class SimpleSAML_Auth_Default { /** - * @deprecated This method will be removed in SSP 2.0. + * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML_Auth_Source::loginCompleted() instead. */ public static function loginCompleted($state) { - assert('is_array($state)'); - assert('array_key_exists("SimpleSAML_Auth_Default.Return", $state)'); - assert('array_key_exists("SimpleSAML_Auth_Default.id", $state)'); - assert('array_key_exists("Attributes", $state)'); - assert('!array_key_exists("LogoutState", $state) || is_array($state["LogoutState"])'); - - $return = $state['SimpleSAML_Auth_Default.Return']; - - /* Save session state. */ - $session = SimpleSAML_Session::getSessionFromRequest(); - $authId = $state['SimpleSAML_Auth_Default.id']; - $session->doLogin($authId, SimpleSAML_Auth_State::getPersistentAuthData($state)); - - if (is_string($return)) { - /* Redirect... */ - \SimpleSAML\Utils\HTTP::redirectTrustedURL($return); - } else { - call_user_func($return, $state); - assert('FALSE'); - } + SimpleSAML_Auth_Source::loginCompleted($state); } |