3 namespace MediaWiki\Auth\Hook
;
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "AuthPreserveQueryParams" to register handlers implementing this interface.
9 * @unstable to implement
12 interface AuthPreserveQueryParamsHook
{
14 * This hook gets called any time an authentication page generates an URL which
15 * is in some sense part of the authentication process (e.g. a language switcher
16 * link, the login form's action URL, or the return URL for a remote identity provider)
17 * and needs to determine which of the current query parameters to preserve in that URL.
21 * @param array &$params Query parameters to preserve, name => value
22 * @param array $options Information about the purpose of the URL that's being generated
23 * - reset (bool, default false): Reset the authentication process, i.e. omit
24 * parameters which are related to continuing in-progress authentication.
25 * This is used e.g. in the link for switching from the login form to the
28 * @return bool|void True or no return value to continue or false to abort
30 public function onAuthPreserveQueryParams( array &$params, array $options );