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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 23 Jan 2008, at 11:30, Varun Goel wrote:> > 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> > Thanks & regards > Varun Goel > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
"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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---