Limiter

class OC\Security\RateLimiting\Limiter
Source:lib/private/Security/RateLimiting/Limiter.php#36

Properties

Methods

public OC\Security\RateLimiting\Limiter::__construct($timeFactory, $backend)
Source:

lib/private/Security/RateLimiting/Limiter.php#46

Parameters:
public OC\Security\RateLimiting\Limiter::registerAnonRequest($identifier, $anonLimit, $anonPeriod, $ip)
Registers attempt for an anonymous request
Source:

lib/private/Security/RateLimiting/Limiter.php#80

Parameters:
  • $identifier (string)
  • $anonLimit (int)
  • $anonPeriod (int)
  • $ip (string)
Throws:

\OC\Security\RateLimiting\Exception\RateLimitExceededException

public OC\Security\RateLimiting\Limiter::registerUserRequest($identifier, $userLimit, $userPeriod, $user)
Registers attempt for an authenticated request
Source:

lib/private/Security/RateLimiting/Limiter.php#99

Parameters:
  • $identifier (string)
  • $userLimit (int)
  • $userPeriod (int)
  • $user (OCP\IUser)
Throws:

\OC\Security\RateLimiting\Exception\RateLimitExceededException