Extension:ForumSessionProvider

MediaWiki extensions manual
ForumSessionProvider
Release status: stable
Implementation User identity , User activity
Description Uses Elkarte or SMF as session provider for single-sign on functionality.
Author(s) Vekseidtalk
Latest version 1.1.0
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.27+
PHP 5.6+
Database changes No
License BSD 3-clause "Modified" License
Download
README.md
Example Elliquiy RP Wiki

$wgFSPPath = "../path/to/forum"; $wgFSPSoftware = "smf2.0"; $wgFSPNameStyle = "smf"; $wgFSPDenyGroups = [38, 42]; $wgFSPAllowGroups = [10, 14]; $wgFSPAdminGroups = [1, 2, 91]; $wgFSPInterfaceGroups = [1, 2, 97];

$wgFSPSuperGroups = [1];
Elkarte 1.0/1.1, SMF 2.0/2.1

This extension allows for an Elkarte Forum or Simple Machines Forum instance to be used as a session provider for MediaWiki 1.27+, allowing for single-sign on functionality.

Installation

edit

To use, place the contents of the release .zip into your /extensions/ folder, and add:

wfLoadExtension('ForumSessionProvider');

to LocalSettings.php

If you are upgrading from an ancient MediaWiki version you will need to make sure $wgSecretKey is set.

$wgSecretKey = "someextraordinarilylongstringgoesheremediawikilikesitlongwithsomethingsomething"

If not, MediaWiki is going to try to hash a null value and have problems. New MW installations will already have this set.

You will also want to lock down editing and creating accounts normally, and set emailconfirmed and autoconfirmed for your users. For example:

$wgGroupPermissions['*']['createaccount']     = false;
$wgGroupPermissions['*']['edit']              = false;

$wgGroupPermissions['user']['edit']           = true;
$wgGroupPermissions['user']['autoconfirmed']  = true;
$wgGroupPermissions['user']['emailconfirmed'] = true;

Configuration

edit

$wgFSPPath Mandatory, path to the Settings.php file without the trailing /

$wgFSPPath = "../elkarte";

$wgFSPSoftware Mandatory if not running the default (Elkarte). Possible values are:

  • elk1.1
  • smf2.0
  • smf2.1
$wgFSPSoftware = "smf2.0";

Warning - I haven't tested SMF 2.1 specifically, but it should work fine. Please open an issue on Github if this isn't the case and I will look into it.

$wgFSPNameStyle Optional, defines how to handle illegal usernames. Defaults to 'smf'. Possible values are:

  • smf - Mimics previous Auth extension behavior, where characters MediaWiki can't use are swapped out with characters SMF can't use.
  • domain - Requires usernames to only use [a-zA-Z0-9 .-]. Doesn't sign people in otherwise.
  • anything else - Invalid usernames are not signed in.
$wgFSPNameStyle = "domain";

$wgFSPAdminGroups Optional array, defaults to [1]. Assigns sysop group. User group 1 (Administrators) is always added even if missing.

$wgFSPInterfaceGroups Optional array, defaults to [1]. Assigns interface-admin group. User group 1 (Administrators) is always added even if missing.

$wgFSPAllowGroups Technically optional array. Those signed into this group gain normal user rights.

$wgFSPDenyGroups Optional array. Anyone in one of the groups doesn't get signed in, unless they are part of an admin group. Supersedes AllowGroups.

$wgFSPSuperGroups Optional array. Grants the bureaucrat group. Not forced onto admins.

$wgFSPDenyGroups = [38, 42];
$wgFSPAllowGroups = [10, 14];
$wgFSPAdminGroups = [1, 2, 91];
$wgFSPInterfaceGroups = [1, 2, 97];
$wgFSPSuperGroups = [1];