diff --git a/modules/core/lib/Auth/UserPassOrgBase.php b/modules/core/lib/Auth/UserPassOrgBase.php index 6eca0d095491f3c16d995fc0c487181a522e115a..8a5e867f51bdffcf19497080bf92f7c484320f44 100644 --- a/modules/core/lib/Auth/UserPassOrgBase.php +++ b/modules/core/lib/Auth/UserPassOrgBase.php @@ -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;