aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/RateLimiting/Backend/IBackend.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2021-09-06 17:31:36 +0200
committerLukas Reschke <lukas@statuscode.ch>2021-09-06 17:31:36 +0200
commit378cc922c429524b872e83c7b3842eb86bc4b770 (patch)
treedbb0e7ef8ab4d859f8f8d7c71155c5a50bd660b3 /lib/private/Security/RateLimiting/Backend/IBackend.php
parentd4f97affc1a0ecfaacfbdc26aab820cad1650a06 (diff)
downloadnextcloud-server-378cc922c429524b872e83c7b3842eb86bc4b770.tar.gz
nextcloud-server-378cc922c429524b872e83c7b3842eb86bc4b770.zip
Adjust logic to store period instead of current timestamp
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.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Security/RateLimiting/Backend/IBackend.php b/lib/private/Security/RateLimiting/Backend/IBackend.php
index d87f53311b2..835a97993da 100644
--- a/lib/private/Security/RateLimiting/Backend/IBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/IBackend.php
@@ -35,16 +35,14 @@ namespace OC\Security\RateLimiting\Backend;
*/
interface IBackend {
/**
- * Gets the amount of attempts within the last specified seconds
+ * Gets the amount of attempts for the specified method
*
* @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(string $methodIdentifier,
- string $userIdentifier,
- int $seconds): int;
+ string $userIdentifier): int;
/**
* Registers an attempt