Menu

Multiple users

Rekha
2007-04-03
2013-04-15
  • Rekha

    Rekha - 2007-04-03

    I have used securityfilter API for implementing the role based access and authorization in my web app. I have an issue when logging into the app in 2 browser instances as 2 different users

    1. Suppose I logged in to the app as user1 with role as 'manager' in browser window 1
    2. Next I login as user2 with role as 'customer' in browser window 2.
    3. If I click on any link in the browser window 1, we get access denied error.

    Ideally the browser window 1 should have the logged in user as 'user1' but in the class we have written implementing the SecurityRealmInterface prints it as 'user2'

    Please suggest

     
    • Colin Kilburn

      Colin Kilburn - 2007-04-03

      Rekha,

      Your issue here is that the 2 windows share the same session.  When you log in with user2, you're changing ownership of your session from user1 to user2.   If you're using IE, I seem to remember there being an option to have each window use a new session but I can't say for sure.  

      Good luck.
      Colin

       
    • Corneil du Plessis

      If the web server is using cookies to manage sessions you may find that only one cookie is shared between the browser instances/windows.

      I suggest you configure your web server to use URL rewriting instead of cookies. This way you can easily have multiple sessions in separate browser windows.
      You will have to take care in your JSPs that you encode the URLs produced by your application.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.