Extension:CASAuthentication

This version of the CAS Authentication plug-in is an attempt to implement CAS Authentication in MediaWiki 1.13+ without having to edit any of the core application files, but by using Hooks. It is based on a previous version by Christophe Naslain.

Feel free to suggest improvements.

What can this extension do?
This extension implements Central Authentication Service (CAS) authentication in place of MediaWiki's standard authentication.

Requirements
You need the phpCAS php classes in order to use this extension (note : phpCAS need itself curl, openssl, zlib and dom php extensions compiled)

Installation
In your extensions directory, create a folder called CASAuth. In the new directory, create a file called CASAuth.php from the code included below.

To install this extension, add the following to LocalSettings.php:

Configuration parameters
in the code, edit the Configuration variables as necessary.

$myCASNewAccounts - controls whether or not new users are automatically created if they have CAS credentials, but do not exist within the mediawiki database.

$_phpCasPath - is the path of the directory that contains CAS.php from the phpCAS library.

$_pwdSecret - is a random string for generating fake passwords for MediaWikis hash cookie.

$_CASconfigEmailDomain is the domain that will be appended to netIds in order to create user e-mail addresses when adding new users.

$_phpCASURL - is the URL of the CAS server performing authenticaton.

$_phpCASPort - is the port used to connect to the CAS server.

$_phpCASURLsub - is the sub directory to the CAS application.

$_phpCASVersion - is the version of CAS to use. (this should be a string, either '1.0' or '2.0'.)