• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can i restrict user to login from different machine if already login?  RSS feed

 
Shahnawaz Siddiqui
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i restrict user to login from different machine if already login?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the User Session and set the Database flag
 
Shahnawaz Siddiqui
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



we can make active flag that is mandatory for login flow.
when user login ,all authentication info and active flag,store session in static map or database .

If user login from some other IP, will compare previous session id with current session id, if different delete the data of previous session so that previous session row from database ,so that it cannot continue n fails .

This approach I feel it is not good,becz every navigation we have to look Database. Can you suggest smthg ???
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shan Sidd wrote:
This approach I feel it is not good,becz every navigation we have to look Database. Can you suggest smthg ???


why every navigation ? only one time enough [login check]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shan Sidd wrote:This approach I feel it is not good,becz every navigation we have to look Database. Can you suggest smthg ???


Please use real words when posting to the forums. Abbreviations such as "becz" in place of "because" and "smthg" in place of "something" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!