Discussions

Web tier: servlets, JSP, Web frameworks: limit login per user

  1. limit login per user (2 messages)

    HI All i want to limit the number of login pre user if userA will connect to the web site from location 1 and he try to connect again (with the same user name) from location 2 he will get message that he already connected to the web site and the old connection will kill (the same as the console screen as web sphere ) any idea thanks
  2. Re: limit login per user[ Go to top ]

    Well, save his login connection in a database tables (user, connection_time, ip_address) and everytime a user tries to connect, check this table first to see if he is in. Well, that was just a quick thought. D.
  3. Re: limit login per user[ Go to top ]

    Well, save his login connection in a database tables (user, connection_time, ip_address) and everytime a user tries to connect, check this table first to see if he is in. Well, that was just a quick thought.

    D.
    After sucessfull authentication, add the userID/Key to a Vector or a List, which is of Application scope or Static. (Vector is synchronized). And upon every authentication you may check if the userId is existing in the Vector, if existing, you may invalidate the session rightaway, and force the re-login..