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.
1 2421 Plater 7,872
Recognized Expert Expert
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)
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 a user from information you got from the
session. Each secure app on a site must challenge the user for name
and password, each and every time the user accesses it (not just once
and then store it in the session). If a secure app is multi-page,...
|
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 passwords and
comparing them with names and passwords stored in database), than I
planed (if comparison was successful) to set a corresponding value of
variable $user_name and on the mentioned page with the help of the
"if"-operator to check whether...
|
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.
|
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 link(peer2peer) with the pc. The problem
occurs when both computers access the system and session cannot identify
which computer should have the right access to the certain page.
Does anyone have ideas to solve it/?
|
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:
Session = "john";
On the next page:
txtName.Text = Session;
| |
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.
|
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 program is like so:
static void Main()
{
|
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 a login to show data.
I want the user to login only once when he visits any of my domains.
|
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 session gets expired.
But In my case one pages continually refreshes for every 30 seconds, hence not giving scope to session timeout even when the user stops using it.
Questions:
Is there any way to stop resetting of time in some specific cases, for...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |