Debian Codegraph @

includes/auth/Hook/SecuritySensitiveOperationStatusHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Auth\Hook;
4
5 use MediaWiki\Session\Session;
6
7 /**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "SecuritySensitiveOperationStatus" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14 interface SecuritySensitiveOperationStatusHook {
15 /**
16 * Use this hook to affect the return value from
17 * MediaWiki\Auth\AuthManager::securitySensitiveOperationStatus().
18 *
19 * @since 1.35
20 *
21 * @param string &$status Status to be returned. One of the AuthManager::SEC_*
22 * constants. SEC_REAUTH will be automatically changed to SEC_FAIL if
23 * authentication isn't possible for the current session type.
24 * @param string $operation Operation being checked
25 * @param Session $session Current session. The currently-authenticated user may
26 * be retrieved as $session->getUser().
27 * @param int $timeSinceAuth Time since last authentication. PHP_INT_MAX if
28 * the time of last auth is unknown, or -1 if authentication is not possible.
29 * @return bool|void True or no return value to continue or false to abort
30 */
31 public function onSecuritySensitiveOperationStatus( &$status, $operation,
32 $session, $timeSinceAuth
33 );
34 }