Extension version: 1.4.1 (last update: 2011-09-14);
MediaWiki version: 1.13.x or newer (tested with 1.13.3, 1.16.0, 1.17.0);
simpleSAMLphp version: 1.6 or newer;
Author: Draženko Celjak, contact: firstname.lastname@example.org;
simpleSAMLphp and MediaWiki installed and operational
Installation and configuration
1. Add the following code to the bottom of LocalSettings.php file (in mediawiki directory):
2. Adjust the value of variable $simplesamlphp_basedir, if needed change attribute names so that they comply to names you are getting from Identity Provider and optionaly change user group permissions. Note that you are able to select between saml2 and shib13. You can also implement custom authorization (more about that in custom authorization section);
3. Download the extension and unpack it to MediaWiki's extension directory;
That's all. If you run into problems or have any suggestions you can contact us by mail.
Extension executes simpleSAMLphpAuthorization hook with array of simpleSAMLphp session attributes as parameter.
Example of custom authorization (LocalSettings.php):
Make sure that you define the hook (line $wgHooks['simpleSAMLphpAuthorization'] = 'sa5Authorization';) before including extension ( require_once('extensions/SimpleSAMLphpAuth.php'); ) so that extension could "know" about it.
Authorization function could be implemented in separate file in extension directory and included somewhere in LocalSettings.php.
Q: I don't seem to be able to edit any pages on my wiki anymore, it throws an error showing the following text: "Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service."
A: Turn off magic quotes either in php.ini or in .htaccess: http://www.php.net/magic_quotes