1
0

InvalidTokenException.php 850 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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\Security\VerificationToken;
  8. /** @since 23.0.0 */
  9. class InvalidTokenException extends \Exception {
  10. /**
  11. * @since 23.0.0
  12. */
  13. public function __construct(int $code) {
  14. parent::__construct('', $code);
  15. }
  16. /**
  17. * @var int
  18. * @since 23.0.0
  19. */
  20. public const USER_UNKNOWN = 1;
  21. /**
  22. * @var int
  23. * @since 23.0.0
  24. */
  25. public const TOKEN_NOT_FOUND = 2;
  26. /**
  27. * @var int
  28. * @since 23.0.0
  29. */
  30. public const TOKEN_DECRYPTION_ERROR = 3;
  31. /**
  32. * @var int
  33. * @since 23.0.0
  34. */
  35. public const TOKEN_INVALID_FORMAT = 4;
  36. /**
  37. * @var int
  38. * @since 23.0.0
  39. */
  40. public const TOKEN_EXPIRED = 5;
  41. /**
  42. * @var int
  43. * @since 23.0.0
  44. */
  45. public const TOKEN_MISMATCH = 6;
  46. }