We're using a SSO developed at UMich called CoSign (www.weblogin.org). We're working on integrating cosign w/ drupal. Currently, we're using the webserver_auth module to handle log in - cosign just sets $_SERVER[ 'REMOTE_USER' ] and creates some cookies, so webserver_auth is working fine.
We need to be able to handle logout tho, and since cosign logout is handled by a cgi, I pretty much just need to have a logout action that redirects to our logout cgi.
Sorry, I'm a complete noob and this is my first attempt at a drupal module. I'm trying this:
function cosign_user($op, &$edit, &$account, $category = NULL) {
global $user;
if( $op == 'logout' ) {
watchdog( 'cosign', "logout: $user->name" );
cosign_logout();
}
} // function cosign_user
function cosign_logout() {
global $user;
module_invoke_all('user', 'logout', NULL, $user);
header('Location: https://' . $_SERVER[ 'SERVER_NAME' ] . '/cgi-bin/logout?'
. 'https://' . $_SERVER[ 'SERVER_NAME' ] . '/drupal/' );
} // function cosign_logout
and it sooooo does not work. I get redirected to https://www.example.org/drupal/?q=logout (not surprising) and I get pages upon pages of my watchdog message.
There are other things this module will need to do eventually (require all editing to be done on the https side, display our login link, etc)... but I'm just trying to get logout working to start. I'd appreciate any suggestions.