Solved

How to allow only single login to a web application

Posted on 2009-04-02
3
330 Views
Last Modified: 2012-05-06
Hi,

My web app is based on struts. My question is as follows

I have logged in using my username and password and again i have accessed the application in another tab or in another browser in the same system. at that time it should not ask the user to login again. It has to display the page of the previous user.

Fopr example, take gmail. If i am logged in with a username and password and again if i am accessing the gmail in another tab, it will open the logged in page of the user. so that i have to logout first and then only i have to login with whatever teh username and password might be

Hope you understand. please let me know if you need any further info in this regard.

0
Comment
Question by:CIPL-Senthil
3 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 500 total points
ID: 24056819
You need to use SESSION to handle for single user auth ... If you have session on the another tab page, then you can handle it.

Normally, all the web application have like this idea?

didn't you use SESSION?
0
 

Author Comment

by:CIPL-Senthil
ID: 24060623
Thank you


But already we are knowing this.  But We want to know any other possibility exists for this

Any ore suggestions...
0
 
LVL 4

Expert Comment

by:sprisoner
ID: 24070560
If you are using a database, whenever user logs in, store the logged time and a flag as true in database. Let every page check this value and if user has logged in recently, you can skip the login part.

Here, you need to login time, because you do not want the user flag to be true always. So check the flag as well as time (for eg. has the user logged in and in last 20 mins?), then no check, else ask to relogin.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction (All good things must come to an end (http://en.wikipedia.org/wiki/All_Good_Things...))The original MySQL API (http://php.net/manual/en/book.mysql.php) has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all current…
Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
This video teaches users how to migrate an existing Wordpress website to a new domain.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question