TwoFactorProviderForUserEnabled.php 972 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Authentication\TwoFactorAuth;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IUser;
  10. /**
  11. * @since 22.0.0
  12. * @deprecated 28.0.0 Use \OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed instead
  13. * @see \OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed
  14. */
  15. class TwoFactorProviderForUserEnabled extends Event {
  16. /** @var IProvider */
  17. private $provider;
  18. /** @var IUser */
  19. private $user;
  20. /**
  21. * @since 22.0.0
  22. */
  23. public function __construct(IUser $user, IProvider $provider) {
  24. $this->user = $user;
  25. $this->provider = $provider;
  26. }
  27. /**
  28. * @return IUser
  29. * @since 22.0.0
  30. */
  31. public function getUser(): IUser {
  32. return $this->user;
  33. }
  34. /**
  35. * @return IProvider
  36. * @since 22.0.0
  37. */
  38. public function getProvider(): IProvider {
  39. return $this->provider;
  40. }
  41. }