I'm developing a vaadin 7 application with user authentication and authorization using jaas with a realm defined in the application server (glassfish).
I have this requirements:
A user can stay logged in for some time, so that he doesn't need to enter his password every time.
I do this by setting the session timeout of the http session.The vaadin session can lock some resources and while locked, no other session can use this resource. All locked resources are released when the vaadin session is closed.
I set the heartbeat intervall to only 15 seconds.
I'm not able to get both requirements to work at the same time.
If I set the http session timeout to a minute, the resources are released a minute after closing the browser, but the user is not authenticated the next time.
If I set the the https session timeout to some days, the user is authenticated for this time but the vaadin session is not instantly closed after 3 missed heartbeats. It will only be closed when the user uses the application the next time with the same http session.
How is it possible to achieve both requirements?
Here more information the the technology I'm using:
- Glassfish 4
- web-app 3.1
- vaadin 7.1.7
- vaadin-cdi 1.0-SNAPSHOT
Thanks for any Help