AuthCAS

Summary:Central Authentication Service(CAS) based authentication

Version: 2009-04-08

Version: 2012-08-28
Prerequisites: PmWiki2.2.1(untested on earlier versions), CAS, phpCAS
Status:
License:
Maintainer: Greg Grimes
Discussion: AuthCAS-Talk

Questions answered by this recipe

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer. How do I authenticate using a CAS server? Can PmWiki use CAS for authentication?

Description

CasAuth uses phpCAS functions to authenticate to a CAS server. "CAS is an authentication system originally created by Yale University to provide a trusted way for an application to authenticate a user."

To install the recipe, follow these steps:

  1. Copy CasAuth.phpΔ to your cookbook directory
  2. Download the current phpCAS
    • Note: phpCAS1.0.1 has a redirect loop bug, download phpCAS1.0.2RC1 or higher
  3. Place phpCAS in your cookbook directory, or another directory you feel comfortable with.
  4. Add the following to your config.php
    • $AuthUser['CasServer'] = 'mycasserver.com'; //the recipe will not work without this line.''
    • $AuthUser['CasPath'] = 'CAS/CAS.php'; //default is CAS/CAS.php
    • @include_once("$FarmD/cookbook/CasAuth.php");
  5. Optionally add the following to your config.php
    • $AuthUser['CasPort'] = 443; //default is 443
    • $AuthUser['CasUri'] = '/uriOnCasServer'; //default is ''
    • $AuthUser['CasRedirectUrl'] = 'http://www.redirectsite.com'; // This is used to redirect from the CAS logout page. Only works if redirection is turned on for the CAS Server
    • $Author = $AuthId; //If you want the $Author set to the username in $AuthId

Notes

CAS does not provide authorization, only authentication. You can use the builtin PmWiki authorization abilities.

A warranty, guarantee or support for CAS or phpCAS is not provided.

Release Notes

This is the second release of CasAuth. It has been tested with PmWiki 2.2.42 and phpCAS 1.0.2RC1 and phpCAS 1.3.1. phpCAS 1.0.1 is confirmed not to work. Logout did not work in the first version. Thanks to Mark Staben for pointing that out to me.

See Also

PmWiki's AuthUser

Contributors

Greg Grimes

Comments

See discussion at AuthCAS-Talk

User notes +3: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.