AuthCAS
Questions answered by this recipe
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:
- Copy CasAuth.phpΔ to your cookbook directory
- Download the current phpCAS
- Note: phpCAS1.0.1 has a redirect loop bug, download phpCAS1.0.2RC1 or higher
- Place phpCAS in your cookbook directory, or another directory you feel comfortable with.
- 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");
- 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
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.