Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:RobLa/AuthPress for MediaWiki

This page documents the AuthBBPress.php authentication extension for MediaWiki. It allows MediaWiki to authenticate against bbPress's user database.

Introduction

This work was requested in one the WordPress IRC meeting on July 6, 2005.

It uses the tip revisions of both bbPress and MediaWiki. The MediaWiki developers are on the verge of releasing 1.5, which will be the target version of this work. The authentication plugin structure didn't change much since 1.4 (not to be confused with authorization/permissions management, which changed a great deal), so if it needs to be backported to 1.4.6, I don't think it'll be a big deal. However, there were some nice enhancements to the plugin interface that will be lost in a 1.4.6 install.

The work got its orginal inspiration from Blitzed MediaWiki modifications. However, I decided to use the current AuthPlugin.php file as my starting point, since there were functions documented in this file that weren't present in the Blitzed version.

Releases

MediaWiki AuthPress.php 0.2.0

Download latest:

Release Notes:

  • 0.2.0 - July 29, 2005
    • Renamed to "AuthPress", to reflect that it'll probably work with both WordPress and bbPress
    • Multiple databases now supported
    • Logins are case-insensitive, but will use the case stored in the MediaWiki database if the account is there, or will use whatever case was used for the first login
    • Requires MediaWiki 1.5beta4 or later
  • 0.1.0 - July 6, 2005
    • Initial version

Installation Instructions

  • Make sure your bbPress database is the same as your MediaWiki database
  • Copy AuthPress.php into your MediaWiki installation in the extensions directory
  • Add the following to your LocalSettings.php file
# Use bbPress Authentication
require_once( 'extensions/AuthPress.php' );
$wgAuth = new AuthPress();
$wgAuth->setAuthPressTablePrefix('bb_');
# Only include the following if you aren't using the same db as MediaWiki
$wgAuth->setAuthPressDBServer ('FIXME');
$wgAuth->setAuthPressDBName('FIXME');
$wgAuth->setAuthPressUser('FIXME');
$wgAuth->setAuthPressPassword('FIXME');

Open issues

  • How should MediaWiki 1.5 user roles be stored?
    • This iteration will require roles to be assigned in the MediaWiki admin interface, using these instructions
  • Are there any differences in userid rules between MediaWiki and bbPress?
    • For now, I'll assume "none that we know of"
  • How is migration/merge going to occur?
    • This has the potential of some of the same problems as the big Wikipedia merge. I hesitate to make this comparison though, because it's not the same size and scale as merging several dozen very active wikis with long histories, and it doesn't need to be nearly as complicated. Still, if there's a "John" registered on bb, and a different "John" registered on MW, there's an issue to resolve. There can be only one (tm).
  • Case-sensitivity of user names
    • Current solution is case-insensitive, but will use the case stored in the MediaWiki database if the account is there, or will use whatever case was used for the first login
  • user_nicename appears not to be used, but has a use on MediaWiki
    • Probably need a patch to fix this in bbPress
    • Should user_nicename correspond to MediaWiki's "Real Name" or "Nickname"? "Real Name" is required by some MediaWiki installs to be sure that proper (legal) copyright attribution is possible.
  • Should values pulled from bbPress be read-only, or should they be editable in MediaWiki?
    • I'm leaning toward "read-only" to make maintenance simpler. Since bbPress is so early in its development, it's likely that assumptions made by this plugin will break. However, MediaWiki does have hooks to make it such that values can be pushed back to bbPress.
    • On the other hand, it appears that a fair number of core modifications to MediaWiki would be necessary to make "read-only" work well. I believe fewer core mods to MediaWiki would be needed if we simply allow changes and propogate them back into bbPress.

Discussion

Discussion of this plugin occurs on the wiki-tech mailing list