Auth.php 713 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\AdminAudit\Actions;
  8. /**
  9. * Class Auth logs all auth related actions
  10. *
  11. * @package OCA\AdminAudit\Actions
  12. */
  13. class Auth extends Action {
  14. public function loginAttempt(array $params): void {
  15. $this->log(
  16. 'Login attempt: "%s"',
  17. $params,
  18. [
  19. 'uid',
  20. ],
  21. true
  22. );
  23. }
  24. public function loginSuccessful(array $params): void {
  25. $this->log(
  26. 'Login successful: "%s"',
  27. $params,
  28. [
  29. 'uid',
  30. ],
  31. true
  32. );
  33. }
  34. public function logout(array $params): void {
  35. $this->log(
  36. 'Logout occurred',
  37. [],
  38. []
  39. );
  40. }
  41. }