This MediaWiki (1.35+) extension allows users in an Elkarte Forum or SMF forum to be automatically signed in if they are of the appropriate usergroup while logged into the forum.
To use, the contents of the ForumSsoProvider directory need to be placed into extensions/ForumSsoProvider. It is then loaded using the 'new' plugin loading method in LocalSettings.php:
wfLoadExtension('ForumSsoProvider');
All settings should be defined prior to calling wfLoadExtension('ForumSsoProvider');
in your LocalSettings.php
$wgFSPath = '/path/to/smf/root/';
$wgFSPSoftware = 'smf2.1';
Login Groups - Users in this group are signed into MediaWiki. Group 2 in SMF is a fake group relating to all users.
$wgFSPAllowGroups = array(5);
Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group. In SMF group 4 is the Newbie group.
$wgFSPDenyGroups = array(4);
$wgFSPAdminGroups = array(1, 3);
$wgFSPSuperGroups = array(1);
$wgFSPInterfaceGroups = array(1);
$wgFSPSpecialGroups = array(
3 => 'special',
);
$wgFSPEnableBanCheck = true;
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createtalk'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['writeapi'] = false;
$wgGroupPermissions['user']['move'] = true;
$wgGroupPermissions['user']['read'] = true;
$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['user']['upload'] = true;
$wgGroupPermissions['user']['autoconfirmed'] = true;
$wgGroupPermissions['user']['emailconfirmed'] = true;
$wgGroupPermissions['user']['createtalk'] = true;
$wgGroupPermissions['user']['createpage'] = true;
$wgGroupPermissions['user']['writeapi'] = true;
These settings are used by the legacy Auth_SMF.php.
define('SMF_IN_WIKI', true);
$wgSMFLogin = true;
Login Groups - Users in this group are signed into MediaWiki. Group 2 in SMF is a fake group relating to all users.
$wgSMFGroupID = array(2);
Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group. In SMF group 4 is the Newbie group.
$wgSMFDenyGroupID = array(4);
$wgSMFAdminGroupID = array(1, 3);
$wgSMFSpecialGroups = array(
3 => 'special',
);
$wgCookieDomain = 'domain.tld';
Set $wgDebugLogFile in your LocalSettings.php:
$wgDebugLogFile = "/some/private/path/mediawiki.log";
Search for ForumSessionProvider and it will tell you what it is thinking.
This bloats pretty quickly, so you'll want to comment it out after you have resolved your problem.
If you are familiar with how your fork's authentication works, feel free to submit a pull request.
If an issue has occurred, please open a new issue. If you have a change, please submit a pull request.