aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/RateLimiting/Backend/IBackend.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-04-12 23:00:02 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-04-13 12:00:18 +0200
commite39e6d0605421faaaec57b3deba1ac2a1805d22e (patch)
tree70e9b4a0de2bdf2b53da9038b9f13e510b974314 /lib/private/Security/RateLimiting/Backend/IBackend.php
parent31ae39c5690b3d69226fdd5e02b7efd72f8fb9d2 (diff)
downloadnextcloud-server-e39e6d0605421faaaec57b3deba1ac2a1805d22e.tar.gz
nextcloud-server-e39e6d0605421faaaec57b3deba1ac2a1805d22e.zip
Remove expired attempts
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Security/RateLimiting/Backend/IBackend.php')
-rw-r--r--lib/private/Security/RateLimiting/Backend/IBackend.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/private/Security/RateLimiting/Backend/IBackend.php b/lib/private/Security/RateLimiting/Backend/IBackend.php
index 092c0e7bb8a..9753eb4997c 100644
--- a/lib/private/Security/RateLimiting/Backend/IBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/IBackend.php
@@ -32,19 +32,23 @@ interface IBackend {
/**
* Gets the amount of attempts within the last specified seconds
*
- * @param string $methodIdentifier
- * @param string $userIdentifier
- * @param int $seconds
+ * @param string $methodIdentifier Identifier for the method
+ * @param string $userIdentifier Identifier for the user
+ * @param int $seconds Seconds to look back at
* @return int
*/
- public function getAttempts($methodIdentifier, $userIdentifier, $seconds);
+ public function getAttempts($methodIdentifier,
+ $userIdentifier,
+ $seconds);
/**
* Registers an attempt
*
- * @param string $methodIdentifier
- * @param string $userIdentifier
- * @param int $timestamp
+ * @param string $methodIdentifier Identifier for the method
+ * @param string $userIdentifier Identifier for the user
+ * @param int $period Period in seconds how long this attempt should be stored
*/
- public function registerAttempt($methodIdentifier, $userIdentifier, $timestamp);
+ public function registerAttempt($methodIdentifier,
+ $userIdentifier,
+ $period);
}