how to expire session on window close

Hi all,
      I created one login page using LDAP server authentication now when
i have logged into the system and without logout i just closed the
window and when i again come and open the window it's come as log in.
But it should not show as already login.
Please tell me that how can i expire session on window close.
Thanks & regards
Varun Goel

Hi all,
     I created one login page using LDAP server authentication now
when
i have logged into the system and without logout i just closed the
window and when i again come and open the window it's come as log in.
But it should not show as already login.
Please tell me that how can i expire session on window close.

You can't do this 100% reliably. You could try an ajax request from
onClose that would log the user out (but of course that will cause
problems if the user has 2 windows open and closes 1).

Fred

"Varun Goel" writes:

Hi all,
      I created one login page using LDAP server authentication now when
i have logged into the system and without logout i just closed the
window and when i again come and open the window it's come as log in.
But it should not show as already login.
Please tell me that how can i expire session on window close.

We faced the same issue on FATdrive.tv plus we also want to have a single sign on per account.

Our solution is to log the sign in user and monitor for extended period of inactivity. If the
threshold is reached we force the session to expire and expires the log entry (either delete or
change its status).

If the user signs out everything is fine. In the case that he doesn't we check for an open session
(log entry) at next login. If an entry is found we expire it and create a new one. This is because
the user may be trying to login a second time or they had not logged out previously.

Basically, we employ both Rails session and our log entry (OnlineSession) to manage user sessions.
Though, the bulk of the work is done in OnlineSession.

Hope this help point you in the right direction.

-- Long
http://FATdrive.tv/wall/trakb/10-Long
http://FATdrive.tv/ - store, play and share