473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to invalidate a session from another computer?

Hi, I have a computer A which I am logging in but i didn't logout until i go to another computer, computer B. How can I request session from computer A and call HttpSession to invalidate session of computer A. In other words, I want to logout from computer A so that I can continue to login computer B.

Thanks & Regards.
Feb 11 '08 #1
1 2410
Plater
7,872 Expert 4TB
Are you trying to keep all the "session" type objects created from computerA?
If not, I have seen web sites do something roughly like this:
When a user logs in from a computer, somewhere in a table, information about that login is stored (the IP/MAC addresses perhaps?).
So then, when another computer attempts to use the same login credentials, the backend can see that a session from the first computer is still open (the user has not logged out and the session has not timed out due to inactivity).
The backend has two options to chose from now. It can either:
A) Inform computer2 that it cannot login with that user as the account is still in use on another system. Rejecting the login request.
or
B) Update the internal state with the information about the new login (IP/MAC sessionID, whatever) and tie it the user login. This would then accept the login and make it the active session for the user credentials. Any further attempt by the first computer would be met with "invalid session state" / "not authenticated" or whatever, and that computer would have to attempt to login again, repeating the process.


If you are trying to keep the session objects, I think you would have to do some "backend smarts" and check to see what session ID is associated with the user credentials requested, and return THAT sessionID as the sessionID for the current connection request (rather than create a new sessionID)
Feb 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
1
by: opt_inf_env | last post by:
Hello, I have a page such that each user can see only a corresponding (personal) part of the page. In the beginning I wanted to perform initialization of users (by asking there names and...
6
by: gargarensis | last post by:
I am using invalidate method from the httpSesion class , but when I press the back button in the internet navigator, the session still is valid.
2
by: Daniel | last post by:
Hi, I had faced a problem while using session in asp.net to trace individual login state. My OS used my pc (OS:Microsoft XP Pro) to develop the system and i used another pc(OS:XP pro) to...
9
by: cashdeskmac | last post by:
I have put a string into Session and tried to retrieve it on the next page I visit but the Session appears empty. I have exactly the same spelling for both adding and retrieving the value: ...
0
by: swiss | last post by:
how can i code logout in a struts application.I have used session.invalidate but it is not accurately logging out from the session .please help me out to solve this problem.
4
by: grayaii | last post by:
Hi, I have a simple form that handles all its paint functionality like so: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); And the entry point to this...
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
5
by: kveerareddy | last post by:
Hi experts, Technologies: Spring, AJAX, Google web tool kit Problem: Ideally when the user stops using a web page then after 30 minutes, if the user is trying to access any ting then the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.