0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-03 21:40:31 +00:00
nextcloud_server/apps/admin_audit/lib/Actions/Auth.php
Luka Trovic 03d11b3980 feat(admin_audit): write admin audit log for login failed
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-04-29 20:07:19 +02:00

56 lines
855 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\AdminAudit\Actions;
/**
* Class Auth logs all auth related actions
*
* @package OCA\AdminAudit\Actions
*/
class Auth extends Action {
public function loginAttempt(array $params): void {
$this->log(
'Login attempt: "%s"',
$params,
[
'uid',
],
true
);
}
public function loginSuccessful(array $params): void {
$this->log(
'Login successful: "%s"',
$params,
[
'uid',
],
true
);
}
public function logout(array $params): void {
$this->log(
'Logout occurred',
[],
[]
);
}
public function loginFailed(array $params): void {
$this->log(
'Login failed: "%s"',
$params,
[
'uid',
],
true
);
}
}