aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Adjust logic to store period instead of current timestampLukas Reschke2021-09-061-149/+0
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Make Security module strictJ0WI2021-04-191-0/+3
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-3/+3
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make OC\Security\RateLimiting strictRoeland Jago Douma2018-01-141-2/+2
| | | | | | | | | * Add return types * Add scalar argument types * Made strict * Cleaned up phpstorm inspections Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2017-12-181-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove expired attemptsLukas Reschke2017-04-131-5/+13
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add support for ratelimiting via annotationsLukas Reschke2017-04-131-0/+138
This allows adding rate limiting via annotations to controllers, as one example: ``` @UserRateThrottle(limit=5, period=100) @AnonRateThrottle(limit=1, period=100) ``` Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>