This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Session Timeout After User Inactivity

General questions regarding the development with ProjX.

Session Timeout After User Inactivity

Postby reversedr » Mon Sep 16, 2019 6:45 pm

Hello!
I would like to force the user to login again on "User Inactivity" for x minutes

I followed the tutorial:
http://doc.sibvisions.com/applications/timeouts_vaadin

And added the lines like this:

Code: Select all
 <!--
  **************************************************************************
  WebUI configuration
  **************************************************************************
  -->
  <servlet>
    <servlet-name>VaadinUI</servlet-name>
    <servlet-class>com.sibvisions.rad.ui.vaadin.server.VaadinServlet</servlet-class>
    <init-param>  <!-- BEGIN Add  -->
       <param-name>Application.connection.timeout</param-name>
       <!-- 1 minutes -->
       <param-value>1</param-value>
    </init-param> <!-- END Add  -->
...


But it didn´t work...what am i doing wrong?

Thank You
reversedr
 
Posts: 35
Joined: Tue Oct 23, 2018 11:03 am

Re: Session Timeout After User Inactivity

Postby Support@SIB » Wed Sep 18, 2019 1:37 pm

Which file did you change (path is relevant here) and did you use the VisionX Live preview to test?

The VisionX Live Preview currently doesn't take care of all settings in web.xml of the application (visionxDir/rad/apps/appName/WebContent/WEB-INF).

If you deploy the application, everything should be fine.

But one thing: If application times out, the login will be shown if the user tries to press a button. Currently, we don't "push" the logout.

It's also possible to configure the session timeout, e.g.

Code: Select all
<session-config>
  <session-timeout>60</session-timeout>
</session-config> 
 
<context-param>
  <description>Heartbeat</description>
  <param-name>heartbeatInterval</param-name>
  <param-value>60</param-value>
</context-param>
 
<context-param>
  <description>Enable Session Timeout</description>
  <param-name>closeIdleSessions</param-name>
  <param-value>true</param-value>
</context-param>

The heartbeatInterval and closeIdleSessions parameter can be configured for the servlet as well, instead of a context-parameter.

This will show an information bar and restarts the application on click.
User avatar
Support@SIB
 
Posts: 353
Joined: Mon Sep 28, 2009 1:56 pm

Re: Session Timeout After User Inactivity

Postby reversedr » Fri Sep 20, 2019 6:33 pm

Yes! i deployed the application and it worked!


Thank you
reversedr
 
Posts: 35
Joined: Tue Oct 23, 2018 11:03 am

Re: Session Timeout After User Inactivity

Postby Support@SIB » Sat Sep 21, 2019 6:04 pm

Next VisionX version will support auto-logout with push and also support the timeout in live-preview.
User avatar
Support@SIB
 
Posts: 353
Joined: Mon Sep 28, 2009 1:56 pm


Return to Development