2017-04-12 14:32:48 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-01-14 05:47:00 -05:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2017-04-12 14:32:48 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-04-12 14:32:48 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Security\RateLimiting\Exception;
|
|
|
|
|
|
|
|
|
|
use OC\AppFramework\Middleware\Security\Exceptions\SecurityException;
|
|
|
|
|
use OCP\AppFramework\Http;
|
2023-09-06 04:04:14 -04:00
|
|
|
use OCP\Security\RateLimiting\IRateLimitExceededException;
|
2017-04-12 14:32:48 -04:00
|
|
|
|
2023-09-06 04:04:14 -04:00
|
|
|
class RateLimitExceededException extends SecurityException implements IRateLimitExceededException {
|
2017-04-12 14:32:48 -04:00
|
|
|
public function __construct() {
|
|
|
|
|
parent::__construct('Rate limit exceeded', Http::STATUS_TOO_MANY_REQUESTS);
|
|
|
|
|
}
|
|
|
|
|
}
|