Skip to content
Snippets Groups Projects
Commit eb002f5b authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Redirect the user if refreshing the login page and the session is lost...

Redirect the user if refreshing the login page and the session is lost (without entering credentials). Will improve user experience

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1246 44740490-163a-0410-bde0-09ae8108e29a
parent 126f7405
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,15 @@ if (!array_key_exists('AuthState', $_REQUEST)) {
}
$authStateId = $_REQUEST['AuthState'];
try {
/* Retrieve the authentication state. */
$state = SimpleSAML_Auth_State::loadState($authStateId, sspmod_core_Auth_UserPassBase::STAGEID);
} catch(Exception $e) {
if (array_key_exists('SessionLostURL', $_REQUEST)) {
SimpleSAML_Utilities::redirect($_REQUEST['SessionLostURL']);
}
}
if (array_key_exists('username', $_REQUEST)) {
$username = $_REQUEST['username'];
} else {
......
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