1
0

RateLimitExceededException.php 581 B

12345678910111213141516171819
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Security\RateLimiting\Exception;
  8. use OC\AppFramework\Middleware\Security\Exceptions\SecurityException;
  9. use OCP\AppFramework\Http;
  10. use OCP\Security\RateLimiting\IRateLimitExceededException;
  11. class RateLimitExceededException extends SecurityException implements IRateLimitExceededException {
  12. public function __construct() {
  13. parent::__construct('Rate limit exceeded', Http::STATUS_TOO_MANY_REQUESTS);
  14. }
  15. }