Message Boards

Session Expiry in Custom User Login Portlet

Vishnu S Kumar, modified 5 Years ago.

Session Expiry in Custom User Login Portlet

Regular Member Posts: 131 Join Date: 7/28/17 Recent Posts
I've created a custom user login portlet exactly as shown in the following link

https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/writing-a-custom-login-portlet

The user sessions are still active even after restarting the server. We would like to keep the default session behaviour of the liferay i.e to sign out users after 30  minutes of inactivity. How do we customize this behaviour in the custom login portlet ?

Thanks!
thumbnail
Olaf Kock, modified 5 Years ago.

RE: Session Expiry in Custom User Login Portlet (Answer)

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Vishnu S KumarI've created a custom user login portlet exactly as shown in the following link

https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/writing-a-custom-login-portlet

The user sessions are still active even after restarting the server. We would like to keep the default session behaviour of the liferay i.e to sign out users after 30  minutes of inactivity. How do we customize this behaviour in the custom login portlet ?
It's possible that you have either persistent session storage enabled in your appserver (e.g. sessions are serialized on shutdown, and deserialized after restart when needed). Another option is that your sessions (on the appserver) are longer than 30 minutes - 30 minutes is tomcat's default, and I believe also Liferay's own default. But by no means it's a mandatory time.
Vishnu S Kumar, modified 5 Years ago.

RE: Session Expiry in Custom User Login Portlet

Regular Member Posts: 131 Join Date: 7/28/17 Recent Posts
It's possible that you have either persistent session storage enabled in your appserver
Thank you, this was the reason. I fixed it by adding the property
session.enable.persistent.cookies=false