IBackend¶
-
interface
OC\Security\RateLimiting\Backend\
IBackend
¶ - Interface IBackend defines a storage backend for the rate limiting data. Itshould be noted that writing and reading rate limiting data is an expensiveoperation and one should thus make sure to only use sufficient fast backends.
Implemented by: OC\Security\RateLimiting\Backend\MemoryCache
Source: lib/private/Security/RateLimiting/Backend/IBackend.php#37
Methods¶
-
public
OC\Security\RateLimiting\Backend\IBackend::
getAttempts
($methodIdentifier, $userIdentifier, $seconds)¶ - Gets the amount of attempts within the last specified seconds
Source: Parameters: - $methodIdentifier (string) Identifier for the method
- $userIdentifier (string) Identifier for the user
- $seconds (int) Seconds to look back at
Returns: int
-
public
OC\Security\RateLimiting\Backend\IBackend::
registerAttempt
($methodIdentifier, $userIdentifier, $period)¶ - Registers an attempt
Source: Parameters: - $methodIdentifier (string) Identifier for the method
- $userIdentifier (string) Identifier for the user
- $period (int) Period in seconds how long this attempt should be stored