aspose file tools*
The moose likes Java in General and the fly likes I want user to not be able to login to application from two differnet browsers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "I want user to not be able to login to application from two differnet browsers" Watch "I want user to not be able to login to application from two differnet browsers" New topic
Author

I want user to not be able to login to application from two differnet browsers

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 644
I want user to not be able to login to application from two different browsers open.how to do this.

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41861
    
  63
What is the purpose of this requirement? It sounds a bit user-hostile.


Ping & DNS - my free Android networking tools app
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
You can keep track of the users logged in and do something against the second logging in of the same user on the application level.

In our e-banking application we threw out the first session with a warning to the second.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14150
    
  18

Suppose that a user closes his or her browser without properly logging out. The server then doesn't know that the user doesn't have the browser open anymore. If the user re-opens the browser and tries to start a new session, would the server then tell the user that he or she is still logged in? You'd need a session timeout mechanism on the server, and even then, if the user would quickly close and re-open the browser, there would be a period that he or she cannot log in.

How did you solve that problem in your application Ivan?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61215
    
  66

That's exactly how my bank's site operates and it irritates me to no end. Is irritating the customers part of the requirements?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Jesper de Jong wrote:How did you solve that problem in your application Ivan?


It is a web application inside a servlet container which provides session handling mechanism including time-out.

We keep track of the users logged in in a database, and if the same user comes again successfully from the login,
which is on the application level, then we issue a warning and disable the previous session.
Only one login of the same user can be active at any given time. It does not forcibly have to be so, but it is in this case.

We handle login on the application level: that might be important when pondering on how to implement this feature.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I want user to not be able to login to application from two differnet browsers