rubycas/rubycas-client — pull request #60 by KrisSiegel (2013-03-21 06:03:22+00:00)
Title: Single sign off not working as expected with authenticate on every request disabled

When using single sign off the RubyCAS gem looks for the ticket passed
to the web application in the logout message. Unfortunately this will
be the latest ticket rather than the ticket the web application is most
likely using when authenticate_on_every_request is disabled making it impossible to end the current session.

This change looks at the authenticate_on_every_request configuration
property to choose the correct experience to avoid the issue with
single sign off enabled and authenticate on every request disabled.

Arguably maybe logoff should always be called; I'm not sure what would be most appropriate with CAS but this change resolved our sign off issues so please let me know if there are any glaring omissions here.