mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-23 15:56:59 +00:00
Remove $wgOATHAuthDatabase support
Change-Id: I284ffeac243b22e8b557255edca3a285828214b5
This commit is contained in:
parent
3e09fffc40
commit
55ea280897
|
@ -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."
|
||||
|
|
|
@ -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',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue