mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
34 lines
806 B
PHP
34 lines
806 B
PHP
<?php
|
|
|
|
namespace Test\AppFramework\Middleware\Security\Mock;
|
|
|
|
use OCP\AppFramework\Controller;
|
|
use OCP\AppFramework\Http\Attribute\AnonRateLimit;
|
|
use OCP\AppFramework\Http\Attribute\UserRateLimit;
|
|
|
|
class RateLimitingMiddlewareController extends Controller {
|
|
/**
|
|
* @UserRateThrottle(limit=20, period=200)
|
|
* @AnonRateThrottle(limit=10, period=100)
|
|
*/
|
|
public function testMethodWithAnnotation() {
|
|
}
|
|
|
|
/**
|
|
* @AnonRateThrottle(limit=10, period=100)
|
|
*/
|
|
public function testMethodWithAnnotationFallback() {
|
|
}
|
|
|
|
public function testMethodWithoutAnnotation() {
|
|
}
|
|
|
|
#[UserRateLimit(limit: 20, period: 200)]
|
|
#[AnonRateLimit(limit: 10, period: 100)]
|
|
public function testMethodWithAttributes() {
|
|
}
|
|
|
|
#[AnonRateLimit(limit: 10, period: 100)]
|
|
public function testMethodWithAttributesFallback() {
|
|
}
|
|
}
|