Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Same user in different machines

 
Ranch Hand
Posts: 30
Hibernate jQuery Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

I'm trying to limitate just one "session per user" simultaneously in a portal using login modules. I create a login module that persist the username in a data source.

I'm using the UsersRolesLoginModule and my login module in the configuration.

THE PROBLEM:

When i log in the user with one brower, OK, it work. But when i try to login in the second brower to test, the login modules ARE NOT EXECUTED, bu the user is authenticated . No logs (neither in trace) in the server (i'm using jboss).

Maybe i could not understand the life cycle from the JAAS.

Can someone help me?

Thanks
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the second browser happens to just be another window or tab of the same browser session, then the behavior is correct. The browser already knows the session cookie and has sent it to the web-server in the HTTP headers. As such, the server - after verifying the validity of the cookie - will not run the login module again.

If the second browser is a completely different browser - such as Chrome when the first browser is Firefox - then you'll need to investigate some more. Even though the source IP address is the same, Chrome and FF should be using different outbound socket ports to communicate with the web-server, and therefore, the web server should count these as completely two different connections.

Arshad Noor
StrongAuth, Inc.
 
Gabriel Ozeas
Ranch Hand
Posts: 30
Hibernate jQuery Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arshad,

I resolved this problem, it seems that the application server was doing cache of the users login. So i disable that and works..


Thanks for the help,
Bye
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic