Skip to content
Snippets Groups Projects
Commit 5c05e0f5 authored by Rimas Misevičius's avatar Rimas Misevičius
Browse files

Add logging for organizational logins

This adds the same logging to UserPassOrgBase::handleLogin function
as it is in the UserPassBase::handleLogin (UserPassBase.php)
parent 02833ff9
No related branches found
No related tags found
No related merge requests found
......@@ -291,7 +291,14 @@ abstract class UserPassOrgBase extends \SimpleSAML\Auth\Source
}
/* Attempt to log in. */
$attributes = $source->login($username, $password, $organization);
try {
$attributes = $source->login($username, $password, $organization);
} catch (\Exception $e) {
\SimpleSAML\Logger::stats('Unsuccessful login attempt from '.$_SERVER['REMOTE_ADDR'].'.');
throw $e;
}
\SimpleSAML\Logger::stats('User \''.$username.'\' at \''.$organization.'\' successfully authenticated from '.$_SERVER['REMOTE_ADDR']);
// Add the selected Org to the state
$state[self::ORGID] = $organization;
......
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