MediaWiki master
|
Inherits LoggerAwareInterface.
Public Member Functions | |
__construct (?array $conditions=null, array $params=[]) | |
clear ( $username=null, $ip=null) | |
Clear the throttle counter. | |
increase ( $username=null, $ip=null, $caller=null) | |
Increase the throttle counter and return whether the attempt should be throttled. | |
setLogger (LoggerInterface $logger) | |
Protected Member Functions | |
logRejection (array $context) | |
Static Protected Member Functions | |
static | normalizeThrottleConditions ( $throttleConditions) |
Handles B/C for $wgPasswordAttemptThrottle. | |
Protected Attributes | |
BagOStuff | $cache |
array[] | $conditions |
See documentation of $wgPasswordAttemptThrottle for format. | |
LoggerInterface | $logger |
string | $type |
int float | $warningLimit |
Definition at line 40 of file Throttler.php.
MediaWiki\Auth\Throttler::__construct | ( | ?array | $conditions = null, |
array | $params = [] ) |
array | null | $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 69 of file Throttler.php.
References MediaWiki\Auth\Throttler\$conditions, $params, MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\PasswordAttemptThrottle, and MediaWiki\Auth\Throttler\setLogger().
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 177 of file Throttler.php.
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 124 of file Throttler.php.
References MediaWiki\Auth\Throttler\logRejection().
|
protected |
Definition at line 220 of file Throttler.php.
Referenced by MediaWiki\Auth\Throttler\increase().
|
staticprotected |
Handles B/C for $wgPasswordAttemptThrottle.
array | $throttleConditions |
Definition at line 210 of file Throttler.php.
MediaWiki\Auth\Throttler::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 106 of file Throttler.php.
References MediaWiki\Auth\Throttler\$logger.
Referenced by MediaWiki\Auth\Throttler\__construct().
|
protected |
Definition at line 56 of file Throttler.php.
|
protected |
See documentation of $wgPasswordAttemptThrottle for format.
Old (pre-1.27) format is not allowed here.
Definition at line 51 of file Throttler.php.
Referenced by MediaWiki\Auth\Throttler\__construct().
|
protected |
Definition at line 57 of file Throttler.php.
Referenced by MediaWiki\Auth\Throttler\setLogger().
|
protected |
Definition at line 43 of file Throttler.php.
|
protected |
Definition at line 54 of file Throttler.php.