44 parent::__construct( $query, $moduleName,
'ami' );
45 $this->authManager = $authManager;
52 'canauthenticatenow' => $this->authManager->canAuthenticateNow(),
53 'cancreateaccounts' => $this->authManager->canCreateAccounts(),
54 'canlinkaccounts' => $this->authManager->canLinkAccounts(),
57 if (
$params[
'securitysensitiveoperation'] !==
null ) {
58 $ret[
'securitysensitiveoperationstatus'] = $this->authManager->securitySensitiveOperationStatus(
59 $params[
'securitysensitiveoperation']
64 $action =
$params[
'requestsfor'];
66 $preservedReq = $helper->getPreservedRequest();
67 if ( $preservedReq ) {
69 'haspreservedstate' => $preservedReq->hasStateForAction( $action ),
70 'hasprimarypreservedstate' => $preservedReq->hasPrimaryStateForAction( $action ),
71 'preservedusername' => (string)$preservedReq->username,
75 'haspreservedstate' =>
false,
76 'hasprimarypreservedstate' =>
false,
77 'preservedusername' =>
'',
81 $reqs = $this->authManager->getAuthenticationRequests( $action, $this->
getUser() );
85 case AuthManager::ACTION_CHANGE:
90 case AuthManager::ACTION_REMOVE:
97 $ret += $helper->formatRequests( $reqs );
109 'securitysensitiveoperation' =>
null,
111 ParamValidator::PARAM_TYPE => [
112 AuthManager::ACTION_LOGIN,
113 AuthManager::ACTION_LOGIN_CONTINUE,
114 AuthManager::ACTION_CREATE,
115 AuthManager::ACTION_CREATE_CONTINUE,
116 AuthManager::ACTION_LINK,
117 AuthManager::ACTION_LINK_CONTINUE,
118 AuthManager::ACTION_CHANGE,
119 AuthManager::ACTION_REMOVE,
120 AuthManager::ACTION_UNLINK,
128 'action=query&meta=authmanagerinfo&amirequestsfor=' . urlencode( AuthManager::ACTION_LOGIN )
129 =>
'apihelp-query+authmanagerinfo-example-login',
130 'action=query&meta=authmanagerinfo&amirequestsfor=' . urlencode( AuthManager::ACTION_LOGIN ) .
131 '&amimergerequestfields=1'
132 =>
'apihelp-query+authmanagerinfo-example-login-merged',
133 'action=query&meta=authmanagerinfo&amisecuritysensitiveoperation=foo'
134 =>
'apihelp-query+authmanagerinfo-example-securitysensitiveoperation',
139 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Authmanagerinfo';
144class_alias( ApiQueryAuthManagerInfo::class,
'ApiQueryAuthManagerInfo' );
array $params
The job parameters.
A class containing constants representing the names of configuration variables.
const RemoveCredentialsBlacklist
Name constant for the RemoveCredentialsBlacklist setting, for use with Config::get()
const ChangeCredentialsBlacklist
Name constant for the ChangeCredentialsBlacklist setting, for use with Config::get()