Deleting Pylons/Beaker session on logout

658 views Asked by At

I'm trying to list online users of my Pylons app by analyzing Beaker's sessions directly from the sessionstore (type = sqla in my case). By "online user" I mean "session has been accessed in the last 30 minutes", and it works nicely.
My current problem is that when a user logs out, the session doesn't get deleted, so she still results as online... Is there a way to intercept the logout process and remove the session?

I'm using repoze.who FriendlyFormPlugin to handle login/logout.. I tried to subclass it and override identify() or challenge(), but when I try to gain access to the session, I get a "No object (name: session) has been registered for this thread". Am I going the wrong way?

1

There are 1 answers

0
Joril On BEST ANSWER

Mister Daniel Holth pointed out the post-logout parameter of FriendlyFormPlugin.