3 namespace MediaWiki\Session\Hook
;
5 use MediaWiki\Request\WebRequest
;
6 use MediaWiki\Session\SessionInfo
;
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "SessionCheckInfo" to register handlers implementing this interface.
12 * @stable to implement
15 interface SessionCheckInfoHook
{
17 * Use this hook to validate a MediaWiki\Session\SessionInfo as it's being
18 * loaded from storage.
22 * @param string &$reason Rejection reason to be logged
23 * @param SessionInfo $info MediaWiki\Session\SessionInfo being validated
24 * @param WebRequest $request WebRequest being loaded from
25 * @param array|bool $metadata Metadata array for the MediaWiki\Session\Session
26 * @param array|bool $data Data array for the MediaWiki\Session\Session
27 * @return bool|void True or no return value to continue, or false to prevent
28 * the MediaWiki\Session\SessionInfo from being used
30 public function onSessionCheckInfo( &$reason, $info, $request, $metadata,