Elgg-MediaWiki Readme FileElgg Authentication Plugin for MediaWikiRequirementsThis plugin has been tested with the following:
InstallationIMPORTANT: The Elgg instance and the MediaWiki instance must reside in the same domain.
How It WorksAnyone can view any page in the wiki without logging in. All other actions require a valid Elgg authentication cookie and the user must not be banned from Elgg. When a user tries to perform a non-view action to a page, the plugin first checks for the Elgg authentication cookie ("elggperm"). If the cookie is missing, the user is denied access to the page and redirected to the Elgg login page. If the cookie exists, the plugin uses the cookie value to generate a hash which is used to look up the user in the Elgg database. If the user is valid and has not been banned, the plugin creates the necessary cookies in MediaWiki and starts a session. If the user does not exist in the Elgg database, the user is redirected to the Elgg login page. If the user exists in the Elgg database, but does not exist in the MediaWiki database, a new account is created automatically. Once this is done, the user is redirected to the appropriate wiki page. The Elgg authentication cookie check is performed each time the user tries to perform an action in the wiki. This means that if the user logs out of Elgg, she will be denied access to the wiki until she logs in to Elgg again. The user account lookup is only performed if the MediaWiki cookies do not exist. This means that if a user is logged in to Elgg and MediaWiki and is subsequently banned while still logged in, he will be denied access to Elgg but continue to have access to the wiki until the MediaWiki cookies expire. Thus, to ensure that the user's status in Elgg is rechecked at a reasonable interval, the default MediaWiki cookie expiry is reduced to one hour. |