mw.ForeignApi is an extension of mw.Api, automatically handling everything required to communicate with another MediaWiki wiki via cross-origin requests (CORS). Authentication-related MediaWiki extensions may extend it further to ensure that the user authenticated on the current wiki will be automatically authenticated on the foreign one. A CentralAuth implementation is provided in I0fd05ef8b9c9db0fdb59c6cb248f364259f80456. Bug: T66636 Change-Id: Ic20b9682d28633baa87d22e6e9fb71ce507da58d
33 lines
1.3 KiB
PHP
33 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* ResourceLoader module for mediawiki.ForeignApi that has dynamically
|
|
* generated dependencies, via a hook usable by extensions.
|
|
*
|
|
* 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
|
|
*/
|
|
|
|
/**
|
|
* ResourceLoader module for mediawiki.ForeignApi and its generated data
|
|
*/
|
|
class ResourceLoaderForeignApiModule extends ResourceLoaderFileModule {
|
|
public function getDependencies( ResourceLoaderContext $context = null ) {
|
|
$dependencies = $this->dependencies;
|
|
Hooks::run( 'ResourceLoaderForeignApiModules', array( &$dependencies, $context ) );
|
|
return $dependencies;
|
|
}
|
|
}
|