NotLoggedInException.php 648 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\AppFramework\Middleware\Security\Exceptions;
  8. use OCP\AppFramework\Http;
  9. /**
  10. * Class NotLoggedInException is thrown when a resource has been requested by a
  11. * guest user that is not accessible to the public.
  12. *
  13. * @package OC\AppFramework\Middleware\Security\Exceptions
  14. */
  15. class NotLoggedInException extends SecurityException {
  16. public function __construct() {
  17. parent::__construct('Current user is not logged in', Http::STATUS_UNAUTHORIZED);
  18. }
  19. }