Extension:GoogleAppsAuthentification

This extension finaly allows a MediaWiki setup to be hooked to Google Apps - when a user logs in, he is automatically redirected to his Google App' login page, and the account is created. Nothing more !

Note : The extension completely disables all other means of authentication (that was our need), so if this is not good for you you might need to adjust.

Installation

 * 1) Create a folder in $IP/extensions/GoogleAppsAuthentication
 * 2) Copy paste the code below in a file that you can name GoogleAppsAuthentication.php for example
 * 3) Download the modified OpenId library from http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/ and unzip it so that you have $IP/extension/GoogleAppsAuthentication/Auth with the two sub folders : OpenID and Yadis & $IP/extension/GoogleAppsAuthentication/tmp.
 * 4) * NB : this is not the same as http://www.janrain.com/openid-enabled - the modified version is compatible with Google Apps, not the original one from Janrains !
 * 5) Adjust the rights to writable by your webserver of $IP/extensions/GoogleAppsAuthentication/tmp (this is necessary for the nonce to be stored localy). Note that the tmp folder that comes with the OpenID library is not empty, so when adjusting rights with chmod, make sure to do it recursively, that is, "chmod -R" instead of just "chmod". Alternatively, you could just create a new folder instead of using the temp folder that comes with the OpenID library.
 * 6) Edit your LocalSettings.php in order to add :

Source code to paste into $IP/extensions/GoogleAppsAuthentication/GoogleAppsAuthentication.php:

Errors
After login, if you see "Internal Error", add the following to LocalSettings.php Try logging in again, if u see something similar... Then disable your LDAP authentication lines which will be in your LocalSettings.php file.

Credits
Created by Bertrand Gorge and Emanuele Nanetti - http://www.crossknowledge.com/, with the help of Tanguy Deleplanque.

Original artwork largely inspired from http://a32.me/2011/03/google-apps-as-single-authentication-point-for-your-corporate-applications/ and Extension:CASAuthentication