CAS: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 23: Line 23:


Apache puts the $REMOTE_USER variable into your application's environment, so you can use that to
Apache puts the $REMOTE_USER variable into your application's environment, so you can use that to
get the username. For example, in PHP, use _ENV['REMOTE_USER']
get the username. For example, in PHP, use $_ENV['REMOTE_USER']
This lets you do whatever you want.
This lets you do whatever you want.

Revision as of 21:21, 3 October 2010

IST provides a service called CAS that can be used to authenticate UW accounts. Relevant docs from IST are http://ist.uwaterloo.ca/~mpatters/cas/user.html

CSC also provides WebAuth for authenticating against CSC accounts instead of UW accounts.

Using CAS in the CSC webhost environment

We've got the CAS module installed on the CSC webserver.

You can use Authtype CAS in your .htaccess files For the simplest case, just require any UW password:

 AuthType CAS
 require valid-user

If you put that in an .htaccess, anything in that folder will require a username to log in.

If you want to require a few specific users, try this:

 Authtype CAS
 require user ctdalek dbelange mimcpher

CGI apps with CAS

Apache puts the $REMOTE_USER variable into your application's environment, so you can use that to get the username. For example, in PHP, use $_ENV['REMOTE_USER'] This lets you do whatever you want.