1
0

ExpiredTokenException.php 691 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Authentication\Exceptions;
  8. use OC\Authentication\Token\IToken;
  9. /**
  10. * @deprecated 28.0.0 use {@see \OCP\Authentication\Exceptions\ExpiredTokenException} instead
  11. */
  12. class ExpiredTokenException extends \OCP\Authentication\Exceptions\ExpiredTokenException {
  13. public function __construct(
  14. IToken $token,
  15. ) {
  16. parent::__construct($token);
  17. }
  18. public function getToken(): IToken {
  19. $token = parent::getToken();
  20. /** @var IToken $token We know that we passed OC interface from constructor */
  21. return $token;
  22. }
  23. }