aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http/Attribute/AnonRateLimit.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Http/Attribute/AnonRateLimit.php')
-rw-r--r--lib/public/AppFramework/Http/Attribute/AnonRateLimit.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Http/Attribute/AnonRateLimit.php b/lib/public/AppFramework/Http/Attribute/AnonRateLimit.php
new file mode 100644
index 00000000000..f02f2b695c5
--- /dev/null
+++ b/lib/public/AppFramework/Http/Attribute/AnonRateLimit.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\AppFramework\Http\Attribute;
+
+use Attribute;
+
+/**
+ * Attribute for controller methods that want to limit the times a not logged-in
+ * guest can call the endpoint in a given time period.
+ *
+ * @since 27.0.0
+ */
+#[Attribute(Attribute::TARGET_METHOD)]
+class AnonRateLimit extends ARateLimit {
+}