AnyLoginFailedEvent.php 791 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Authentication\Events;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * Emitted when the authentication fails
  11. *
  12. * @since 26.0.0
  13. */
  14. class AnyLoginFailedEvent extends Event {
  15. private string $loginName;
  16. private ?string $password;
  17. /**
  18. * @since 26.0.0
  19. */
  20. public function __construct(string $loginName, ?string $password) {
  21. parent::__construct();
  22. $this->loginName = $loginName;
  23. $this->password = $password;
  24. }
  25. /**
  26. * @since 26.0.0
  27. */
  28. public function geLoginName(): string {
  29. return $this->loginName;
  30. }
  31. /**
  32. * @since 26.0.0
  33. */
  34. public function getPassword(): ?string {
  35. return $this->password;
  36. }
  37. }