You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/tests/lib/AppFramework/Middleware/Security/Mock/RateLimitingMiddlewareContr...

34 lines
806 B

<?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() {
}
}