sure thing. I'm glad it worked for you. I'm curious how you're going to handle local authentication to your PHP application. I haven't looked at it much more since my last post, but I still haven't figured out how to expire the user's local authentication to Moodle or WordPress after CAS sends the "logout" callback request.
So I'm interested in any ideas you or anyone else might have for expiring local authentication in PHP applications. -Brian ________________________________________ From: Brian Long [[email protected]] Sent: Monday, March 16, 2009 11:59 AM To: [email protected] Subject: Re: [cas-user] single sign out with phpCAS Thanks Brian that works like a champ. Pieslak, Brian wrote: > Brian, > I found that I need *both* the call to handleLogoutRequest() AND a check for > "logout" in the Request. > > So ultimately I have the following specifically for handling single sign out: > > //connect to CAS > ... > //setup handleLogoutRequests > phpCAS::handleLogoutRequests(true, array( "localhost" ) ); > > //check for logout request > if (isset($_REQUEST['logout'])) { > $backurl = $CFG->wwwroot; > phpCAS::logoutWithUrl($backurl); > } > > //if not a logout request, check authentication > if (phpCAS::checkAuthentication()) { > ... > > > If you haven't used it already, I found that the phpCAS::setDebug is REALLY > useful. > > Put the following: > phpCAS::setDebug("C:/temp/phpCAS.log"); > > Before you call phpCAS::proxy or phpCAS::client > > Then if you're on linux (or windows using UnixUtils), you can tail the > logfile ( C:\temp>tail -f phpCAS.log ) and the tail will show you exactly > what's being written to the logfile. > > My only outstanding issue with this is it seems to log me out of CAS > perfectly, but my local application (Moodle) session is still alive, so I > think I need to do something else to terminate the local application session > for the user associated with that Service Ticket. > > Hope that helps. > -Brian > ________________________________________ > From: Brian Long [[email protected]] > Sent: Friday, March 13, 2009 11:04 AM > To: [email protected] > Subject: Re: [cas-user] single sign out with phpCAS > > I see the handleLogoutRequests() API - I'm successfully logging into CAS > and would like to test this logout feature. Is it as simple as putting > the call to handleLogoutRequests() in my main php page and logging out > via a different browser window? > > Thanks in advance > -bml > > > Pieslak, Brian wrote: > >> Thank you very much for the example, Rhian. >> >> After a bit of further investigation I found that I was not using the >> latest phpCAS client, so I have downloaded the latest from here: >> http://www.ja-sig.org/wiki/display/CASC/phpCAS+installation+guide and >> I now see the API for "handleLogoutRequests". >> >> I'm specifically working with Moodle and WordPress, so I'll see how >> their authentication plugins can be used to check for logout requests. >> >> If anyone has already implemented Single Sign Out with phpCAS >> specifically using Moodle or WordPress, that would be a huge help. >> >> Thanks again. >> -Brian >> ------------------------------------------------------------------------ >> *From:* Rhian Resnick [[email protected]] >> *Sent:* Thursday, March 12, 2009 9:26 PM >> *To:* [email protected] >> *Subject:* RE:[cas-user] single sign out with phpCAS >> >> We implemented Single Sign Out with phpCAS when we upgraded to CAS >> 3.3. We started with the base phpcas distribution + an extension to >> support returned attributes. >> >> >> >> The biggest gotcha was that we need to publicize the dns entries our >> CAS servers would be coming from as the CAS servers are part of a >> secure apache cluster. >> >> >> >> I attached an example from our E-Academy authentication. >> >> >> >> - Rhian >> >> >> >> *From:* Pieslak, Brian [mailto:[email protected]] >> *Sent:* Thursday, March 12, 2009 8:18 PM >> *To:* [email protected] >> *Subject:* [cas-user] single sign out with phpCAS >> >> >> >> Has anyone successfully implemented single sign out with phpCAS? I >> looked through the available documentation online and I didn't see any >> explicit instructions or examples for implemented SS Out with phpCas, >> so I'm trying to gauge if its worth implemented my own custom solution >> or if I should just punt on the idea. >> >> >> >> Any recommendations from those who use phpCAS? >> >> >> >> Thanks a ton, >> >> -Brian >> >> >> >> -- >> >> You are currently subscribed to [email protected] as: [email protected] >> >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-user >> >> -- >> You are currently subscribed to [email protected] as: >> [email protected] >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-user >> >> -- >> You are currently subscribed to [email protected] as: [email protected] >> To unsubscribe, change settings or access archives, see >> http://www.ja-sig.org/wiki/display/JSG/cas-user >> > > > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
