Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Server-side session timeout

    I would like to be able to detect when the user has not interacted with the server for a period.
    The normal session timeout will not work for me because the client has a timer that periodically checks something on the server.

    I tried creating a custom datasource by extending SQLDataDource and adding serverConstructor into the .ds.xml files. This was OK except when there was also serverObject custom DMI class. I don't really want to add custom code to each DMI.
    I did see some reference to EventPreview in the client side, but it was unclear how exactly to implement this.

    SmartClient Version: v9.0p_2013-10-17/PowerEdition Deployment (built 2013-10-17)

    smartgwt-power-4.0-p20131017.jar

    #2
    Could you rephrase your question? What is the purpose of this custom DataSource, are you planning to use it to store session timeout information?

    Comment


      #3
      As stated in the first sentence, I would like to be able to detect inactivity from the client [in order to force re-authentication after a period].

      The custom datasource was a means by which I could intercept a client request in order to record the activity for a session.

      Comment


        #4
        A Custom DataSource would give you the ability to track every time a user performs an operation on a DataSource. This article shows using this to build a crude version of the built-in Auditing feature.

        However, this would not necessary capture *all* of the activity that should avoid session timeout. Some other kinds of activity that would be missed would include images fetches, non-DataSource RPCs including builtinRPCs, and anything where you've built a custom servlet to handle a request and not used any DataSources.

        We'd recommend one of the following approaches instead:

        1. see if you can configure your authentication system to ignore certain requests for the purpose of session timeouts

        OR

        2. implement a servlet Filter that covers every URL, so you can detect a hit to any URL on the server regardless of whether DataSources are involved or not, and just ignore the Messaging-related requests.

        Comment

        Working...
        X