log failed sign in

This commit is contained in:
Daniel Seifert 2022-11-01 10:37:50 +01:00
parent 77768070ee
commit 3baffaef2d
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
3 changed files with 5 additions and 0 deletions

View File

@ -110,6 +110,8 @@ class d3webauthnadminlogin extends AdminController
}
} catch (AssertionFailedException|WebauthnException $e) {
Registry::getUtilsView()->addErrorToDisplay($e->getMessage());
// ToDo: add requested username
Registry::getLogger()->info($e->getMessage());
$user->logout();
$this->getUtils()->redirect('index.php?cl=login');

View File

@ -111,6 +111,8 @@ class d3webauthnlogin extends FrontendController
} catch (AssertionFailedException|WebauthnException $e) {
Registry::getUtilsView()->addErrorToDisplay($e->getMessage());
// ToDo: add requested username
Registry::getLogger()->info($e->getMessage());
$user->logout();
$this->getUtils()->redirect('index.php?cl=start');

View File

@ -38,6 +38,7 @@ class WebauthnErrors
return $lang->translateString('D3_WEBAUTHN_ERR_UNKNOWN', null, true);
case self::NOPUBKEYSUPPORT:
return $lang->translateString('D3_WEBAUTHN_ERR_NOPUBKEYSUPPORT', null, true);
// ToDo: translate messages from Webauthn package like "The credential ID is invalid."
}
return $msg;