Remove $wgOATHAuthDatabase support

Change-Id: I284ffeac243b22e8b557255edca3a285828214b5
This commit is contained in:
Reedy 2024-11-08 22:37:36 +00:00
parent 3e09fffc40
commit 55ea280897
2 changed files with 1 additions and 51 deletions

View file

@ -54,8 +54,7 @@
"getUserPermissionsErrors": "main",
"UserEffectiveGroups": "main",
"UserGetRights": "main",
"BeforeCreateEchoEvent": "echo",
"MediaWikiServices": "mwservices"
"BeforeCreateEchoEvent": "echo"
},
"HookHandlers": {
"main": {
@ -72,9 +71,6 @@
},
"echo": {
"class": "MediaWiki\\Extension\\OATHAuth\\Hook\\EchoHandler"
},
"mwservices": {
"class": "MediaWiki\\Extension\\OATHAuth\\Hook\\MWServicesHandler"
}
},
"MessagesDirs": {
@ -88,10 +84,6 @@
"value": 4,
"description": "Number of token windows on either side of current time to be considered valid for authentication."
},
"OATHAuthDatabase": {
"value": false,
"description": "Deprecated; configure the virtual-oathauth virtual domain instead."
},
"OATHAuthAccountPrefix": {
"value": false,
"description": "Prefix for user account shown during enrollment."

View file

@ -1,42 +0,0 @@
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
namespace MediaWiki\Extension\OATHAuth\Hook;
use MediaWiki\Hook\MediaWikiServicesHook;
/**
* @author Taavi Väänänen <hi@taavi.wtf>
*/
class MWServicesHandler implements MediaWikiServicesHook {
/** @inheritDoc */
public function onMediaWikiServices( $services ) {
global $wgOATHAuthDatabase, $wgVirtualDomainsMapping;
if ( $wgOATHAuthDatabase && !isset( $wgVirtualDomainsMapping['virtual-oathauth'] ) ) {
$wgVirtualDomainsMapping['virtual-oathauth'] = [ 'db' => $wgOATHAuthDatabase ];
wfDeprecatedMsg(
'$wgOATHAuthDatabase is deprecated, configure the virtual-oathauth virtual domain instead',
'1.42',
);
}
}
}