Skip to content
Snippets Groups Projects
Unverified Commit 6c880fc1 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo Committed by GitHub
Browse files

Merge pull request #1133 from rmisev/log-org-login

Add logging for organizational logins
parents 72791b2b 5c05e0f5
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,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