Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Logging out from phpCAS is done by calling one of the phpCAS::logoutXxx() methods. Calling any of these methods will:

  • kill the the current PHP session
  • redirected the browser to the CAS server 
  • kill the CAS session

The behavior of the CAS server then depends on:

  • the logout method called
  • its configuration

phpCAS::logout()

After logout, the CAS server prints the logout page.

phpCAS::logoutWithRedirectService($service)

After logout, the CAS server redirects the browser to the given URL.

If redirection is not enabled on the CAS server, the CAS server simply displays the logout page.

phpCAS::logoutWithUrl($url)

After logout, the CAS server shows a page with a link to the given URL.

phpCAS::logoutWithRedirectServiceAndUrl($service, $url)

If redirection is enabled, the CAs server redirects the browser to the given URL ($service) and the $url parameter is ignored.

Otherwise,  the CAS server shows a page with a link to the given URL.

phpCAS::logout($params)

The service and url parameters can also be passed in an array:

call with an array

shortcut

logout(array())

logout()

logout(array('service'=>'www.myservicesite.com'))

logoutWithRedirectService('www.myservicesite.com')

logout(array('url'=>'www.myurlsite.com'))

logoutWithUrl('www.myurlsite.com')

logout(array('service'=>'www.myservicesite.com', 'url'=>'www.myurlsite.com'))

logoutWithRedirectServiceAndUrl('www.myservicesite.com', 'www.myurlsite.com')



  • No labels