Skip to end of metadata
Go to start of metadata
Table of Contents

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.

Icon

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

phpCAS::logoutWithUrl($url)

Icon

Deprecated for CAS servers > 3.3.5.

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

phpCAS::logoutWithRedirectServiceAndUrl($service, $url)

Icon

Deprecated for CAS servers > 3.3.5.

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