I use the CAS module for SSO. Currently, when a logout is triggered, an AJAX request is made to ?q=autologout_ahah_logout. Normally this would be fine but since all of the module logout functions are called including the CAS module's, a redirect occurs to the CAS server to indicate the user has logged out. The problem is that for an AJAX call this is scene as a Cross-Domain request since the CAS server is unlikely to be located on the same domain as the Drupal site.

I am wondering if instead of using an AJAX call whether it might not work better to do a window.location redirect to ?q=autologout_ahah_logout.

In my case, this works perfectly okay. I could write up a patch for the code if you are interested in taking this approach.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnennew’s picture

I can see this would be useful but I'd suggest as an option. The ajax method is pretty robust in most situations.

wdouglascampbell’s picture

Okay. That seems reasonable. Let me try and work something up and then I can post back a patch that adds this as a configurable alternative that an administrator can set.

wdouglascampbell’s picture

Version: 7.x-4.3 » 7.x-4.x-dev
wdouglascampbell’s picture

wdouglascampbell’s picture

Status: Active » Needs review
wdouglascampbell’s picture

Take a look at the patch I have submitted against the HEAD. It allows the user to easily check a box in the admin settings to use an alternate non-AJAX method for the logout. When auto logout is trigger, the logout function checks to see if the variable tied to the checkbox is true. If it is, it will just do a page redirect, otherwise it will continue using the original AJAX service call method.

wdouglascampbell’s picture

Any comments? Can we get this patch included?

  • Commit eea503d on 7.x-4.x authored by wdouglascampbell, committed by ceng:
    Issue #2223549 by wdouglascampbell: Allow autologout to work with SSO...
johnennew’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit eea503d on 7.x-4.x, 8.x-1.x authored by wdouglascampbell, committed by ceng:
    Issue #2223549 by wdouglascampbell: Allow autologout to work with SSO...