Attempt to delete session on TPAC logout user/jeff/alternate_delete_session_on_tpac_logout
authorJeff Godin <jgodin@tadl.org>
Wed, 22 Jan 2014 14:38:14 +0000 (09:38 -0500)
committerJeff Godin <jgodin@tadl.org>
Wed, 22 Jan 2014 14:38:14 +0000 (09:38 -0500)
Attempt to delete the auth session when we log out of the TPAC.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

index 0af9399..31dd67c 100644 (file)
@@ -453,6 +453,16 @@ sub load_logout {
     my $self = shift;
     my $redirect_to = shift || $self->cgi->param('redirect_to');
 
+    # Blindly attempt to delete this session, regardless of if it exists
+    if ($self->cgi->cookie(COOKIE_SES)) {
+        try{
+            my $response = $U->simplereq(
+            'open-ils.auth',
+            'open-ils.auth.session.delete',
+            $self->cgi->cookie(COOKIE_SES));
+        } catch Error with {};
+    }
+
     # If the user was adding anyting to an anonymous cache 
     # while logged in, go ahead and clear it out.
     $self->clear_anon_cache;