Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Persistent authentication

 
Oliver Kohll
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'd like to find a way to persist a login to my Tomcat app across browser restarts. For example, if I use calendar.google.com, I am still logged in after quitting the browser and starting it up again.

Ideally this would be configuration based, or perhaps by plugging in a third party authentication mechanism. Managing my own cookies would be the least preferred route.

Any ideas?
Regards
Oliver
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
provided the data stored on the session is Serializable and the Tomcat insta ce is shutdown cleanly, the session information should be persisted between Tomcat restarts. Or it was last time I checked
 
Oliver Kohll
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I don't mean Tomcat server restarts, I mean client side browser restarts (as long as cookies aren't cleared of course)
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. Usually session cookies are in memory only, but the easiest way to accomplish this is to write servlet code that reads the JSESSIONID cookie and then rewrite it as a persistent cookie.
 
Oliver Kohll
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That works, thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic