MediaWiki
1.28.0
|
Public Member Functions | |
__construct (array $conditions=null, array $params=[]) | |
clear ($username=null, $ip=null) | |
Clear the throttle counter. More... | |
increase ($username=null, $ip=null, $caller=null) | |
Increase the throttle counter and return whether the attempt should be throttled. More... | |
setLogger (LoggerInterface $logger) | |
Protected Member Functions | |
logRejection (array $context) | |
Static Protected Member Functions | |
static | normalizeThrottleConditions ($throttleConditions) |
Handles B/C for $wgPasswordAttemptThrottle. More... | |
Protected Attributes | |
BagOStuff | $cache |
array | $conditions |
See documentation of $wgPasswordAttemptThrottle for format. More... | |
LoggerInterface | $logger |
string | $type |
int float | $warningLimit |
Definition at line 36 of file Throttler.php.
array | $conditions | An array of arrays describing throttling conditions. Defaults to $wgPasswordAttemptThrottle. See documentation of that variable for format. |
array | $params | Parameters (all optional):
|
Definition at line 62 of file Throttler.php.
References MediaWiki\$config, $params, cache, conditions, Config\get(), ConfigFactory\getDefaultInstance(), MediaWiki\Logger\LoggerFactory\getInstance(), ObjectCache\getLocalClusterInstance(), MediaWiki\Auth\Throttler\setLogger(), and type.
MediaWiki\Auth\Throttler::clear | ( | $username = null , |
|
$ip = null |
|||
) |
Clear the throttle counter.
Should be called after a successful authentication attempt.
string | null | $username | |
string | null | $ip |
Definition at line 168 of file Throttler.php.
References $username, as, cache, conditions, type, and wfGlobalCacheKey().
MediaWiki\Auth\Throttler::increase | ( | $username = null , |
|
$ip = null , |
|||
$caller = null |
|||
) |
Increase the throttle counter and return whether the attempt should be throttled.
Should be called before an authentication attempt.
string | null | $username | |
string | null | $ip | |
string | null | $caller | The authentication method from which we were called. |
Definition at line 112 of file Throttler.php.
References $count, $username, as, cache, conditions, MediaWiki\Auth\Throttler\logRejection(), type, and wfGlobalCacheKey().
|
protected |
Definition at line 193 of file Throttler.php.
Referenced by MediaWiki\Auth\Throttler\increase().
|
staticprotected |
Handles B/C for $wgPasswordAttemptThrottle.
array | $throttleConditions |
Definition at line 183 of file Throttler.php.
MediaWiki\Auth\Throttler::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 94 of file Throttler.php.
References MediaWiki\Auth\Throttler\$logger.
Referenced by MediaWiki\Auth\Throttler\__construct().
|
protected |
Definition at line 47 of file Throttler.php.
|
protected |
See documentation of $wgPasswordAttemptThrottle for format.
Old (pre-1.27) format is not allowed here.
Definition at line 45 of file Throttler.php.
|
protected |
Definition at line 49 of file Throttler.php.
Referenced by MediaWiki\Auth\Throttler\setLogger().
|
protected |
Definition at line 38 of file Throttler.php.
|
protected |
Definition at line 51 of file Throttler.php.