Extension:MediaWikiAuth

From MediaWiki.org
(Redirected from MediaWikiAuth)
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
MediaWikiAuth

Release status: beta

Implementation User identity
Description Transparently imports users from another wiki
Author(s) Laurence Parry (GreenReaperTalk)
Last version 0.3
MediaWiki 1.13+ recommended
License GNU General Public License 2.0 or later
Download
Parameters

$wgMediaWikiAuthAPIURL
$wgMediaWikiAuthPrefsURL

Check usage (experimental)

The MediaWikiAuth extension transparently logs a user in to a remote wiki, importing the user's account and preferences to the local wiki.

Contents

[edit] What can this extension do?

This extension uses the MediaWiki API and AuthPlugin framework to direct login requests with no local account to a remote wiki, optionally checking against a table of users for which this should be attempted. The account and its preferences are imported, so the remote login only has be done once. If possible, the same internal user ID is preserved.

This extension is useful for moving a community from another wiki when you do not have access to the user account database. From a user perspective, it's like they already had an account on the local wiki.

[edit] Usage

Install MediaWikiAuth as specified below, set $wgMediaWikiAuthAPIURL and $wgMediaWikiAuthPrefsURL for the remote wiki, and login using an account on the remote wiki which is not currently present on the local wiki.

[edit] Installation

  1. Download the files into $IP/extensions/MediaWikiAuth
  2. Apply the patch (SpecialUserlogin.php-1.17alpha.r67921.patch) against your wiki's includes/specials/SpecialUserlogin.php
  3. Add the following to LocalSettings.php:
    $wgMediaWikiAuthAPIURL = 'http://www.example.com/w/api.php';
    $wgMediaWikiAuthPrefsURL = 'http://www.example.com/wiki/Special:Preferences?uselang=en'; # the ?uselang=en parameter is important!
    require_once("$IP/extensions/MediaWikiAuth/MediaWikiAuth.php");
    $wgAuth = new MediaWikiAuthPlugin();
  4. Installation can now be verified through your wiki's Special:Version page

[edit] Configuration parameters

$wgMediaWikiAuthAPIURL

URL to the api.php file on the target wiki. Normally in the /w/ directory (e.g. http://www.mediawiki.org/w/api.php), but not always; for example, Wikia's is at http://www.wikia.com/api.php.

$wgMediaWikiAuthPrefsURL

URL to the Special:Preferences page on the target wiki. Remember to append ?uselang=en to the URL, like this: http://www.wikia.com/wiki/Special:Preferences?uselang=en (see MediaWikiAuth.php, line 309 for the reason why this needs to be done)

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox