30 parent::__construct( $query, $moduleName,
'ami' );
31 $this->authManager = $authManager;
38 'canauthenticatenow' => $this->authManager->canAuthenticateNow(),
39 'cancreateaccounts' => $this->authManager->canCreateAccounts(),
40 'canlinkaccounts' => $this->authManager->canLinkAccounts(),
43 if ( $params[
'securitysensitiveoperation'] !==
null ) {
44 $ret[
'securitysensitiveoperationstatus'] = $this->authManager->securitySensitiveOperationStatus(
45 $params[
'securitysensitiveoperation']
49 if ( $params[
'requestsfor'] ) {
50 $action = $params[
'requestsfor'];
52 $preservedReq = $helper->getPreservedRequest();
53 if ( $preservedReq ) {
55 'haspreservedstate' => $preservedReq->hasStateForAction( $action ),
56 'hasprimarypreservedstate' => $preservedReq->hasPrimaryStateForAction( $action ),
57 'preservedusername' => (string)$preservedReq->username,
61 'haspreservedstate' =>
false,
62 'hasprimarypreservedstate' =>
false,
63 'preservedusername' =>
'',
67 $reqs = $this->authManager->getAuthenticationRequests( $action, $this->
getUser() );
71 case AuthManager::ACTION_CHANGE:
76 case AuthManager::ACTION_REMOVE:
83 $ret += $helper->formatRequests( $reqs );
97 'securitysensitiveoperation' =>
null,
99 ParamValidator::PARAM_TYPE => [
100 AuthManager::ACTION_LOGIN,
101 AuthManager::ACTION_LOGIN_CONTINUE,
102 AuthManager::ACTION_CREATE,
103 AuthManager::ACTION_CREATE_CONTINUE,
104 AuthManager::ACTION_LINK,
105 AuthManager::ACTION_LINK_CONTINUE,
106 AuthManager::ACTION_CHANGE,
107 AuthManager::ACTION_REMOVE,
108 AuthManager::ACTION_UNLINK,
117 'action=query&meta=authmanagerinfo&amirequestsfor=' . urlencode( AuthManager::ACTION_LOGIN )
118 =>
'apihelp-query+authmanagerinfo-example-login',
119 'action=query&meta=authmanagerinfo&amirequestsfor=' . urlencode( AuthManager::ACTION_LOGIN ) .
120 '&amimergerequestfields=1'
121 =>
'apihelp-query+authmanagerinfo-example-login-merged',
122 'action=query&meta=authmanagerinfo&amisecuritysensitiveoperation=foo'
123 =>
'apihelp-query+authmanagerinfo-example-securitysensitiveoperation',
129 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Authmanagerinfo';
134class_alias( ApiQueryAuthManagerInfo::class,
'ApiQueryAuthManagerInfo' );
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()