Skip to content
Snippets Groups Projects
Commit 96bb5ad6 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Reimplement the old SimpleSAML_Auth_Default::loginCompleted() as a wrapper of...

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.
parent 97547c4a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment