Skip to content

Commit b10586a

Browse files
authored
Add more logging
1 parent 968f30e commit b10586a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Auth/Source/Radius.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Exception;
99
use SimpleSAML\Configuration;
1010
use SimpleSAML\Error;
11+
use SimpleSAML\Logger;
1112
use SimpleSAML\Module\core\Auth\UserPassBase;
1213
use SimpleSAML\Utils;
1314

@@ -174,6 +175,7 @@ protected function login(
174175
$errorCode = $radius->getErrorCode();
175176
switch ($errorCode) {
176177
case $radius::TYPE_ACCESS_REJECT:
178+
Logger::warning('ldapRadius: Radius authentication failed.');
177179
throw new Error\Error('WRONGUSERPASS');
178180
case $radius::TYPE_ACCESS_CHALLENGE:
179181
throw new Exception('Radius authentication error: Challenge requested, but not supported.');
@@ -186,8 +188,9 @@ protected function login(
186188
}
187189
}
188190

189-
// If we get this far, we have a valid login
191+
Logger::info('ldapRadius: Radius authentication succeeded.');
190192

193+
// If we get this far, we have a valid login
191194
$attributes = [];
192195
if ($this->usernameAttribute !== null) {
193196
$attributes[$this->usernameAttribute] = [$username];

0 commit comments

Comments
 (0)