Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Auth\Hook; |
4 | |
5 | /** |
6 | * This is a hook handler interface, see docs/Hooks.md. |
7 | * Use the hook name "AuthenticationAttemptThrottled" to register handlers implementing this interface. |
8 | * |
9 | * @stable to implement |
10 | * @ingroup Hooks |
11 | */ |
12 | interface AuthenticationAttemptThrottledHook { |
13 | /** |
14 | * This hook is called when a {@link Throttler} has throttled an authentication attempt. |
15 | * An authentication attempt includes account creation, logins, and temporary account auto-creation. |
16 | * |
17 | * @since 1.43 |
18 | * |
19 | * @param string $type The name of the authentication throttle that caused the throttling |
20 | * @param string|null $username The username associated with the action that was throttled, or null if not |
21 | * relevant. |
22 | * @param string|null $ip The IP used to make the action that was throttled, or null if not provided. |
23 | * @return bool|void True or no return value to continue or false to abort |
24 | */ |
25 | public function onAuthenticationAttemptThrottled( string $type, ?string $username, ?string $ip ); |
26 | } |