[pmwiki-users] CAS (central authentication server)
geobrown at cs.indiana.edu
Thu Dec 22 14:04:59 CST 2005
My university, like many, implements a central authentication service
to provide a single
authority for user authentication. This eliminates the need to store
I found it relatively easy to integrate the phpCAS module that allows
access to this
service into PmWIki. The following is offered as a starting point
for others, my experience
with php is pretty limited so I doubt this is the cleanest solution.
The phpCAS module is in /CAS.
I created a file scripts/casAuth.php with the following contents:
SDV($AuthDeniedFmt,"Access attempted to unauthorized feature.");
header("Status: 401 Unauthorized");
header("HTTP-Status: 401 Unauthorized");
$_SESSION['authid'] = phpCAS::getUser();
header('Location: http://'. $_SERVER['SERVER_NAME'] .
$ScriptUrl . $_SERVER['REQUEST_URI']);
I added the following to config.php
$AuthUser['cas'] = 'cas.iu.edu';
Passwords are declared as with authuser
$DefaultPasswords['attr'] = 'id:geobrown';
Other than dealing with some peculiarities of the local cas
implementation and deciphering pmwiki, things pretty
much just worked as expected.
More information about the pmwiki-users