Client API returns nothing if the session has expired

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

LKirby
Ebase User
Posts: 37
Joined: Wed Mar 13, 2013 11:33 am
Contact:

Client API returns nothing if the session has expired

#1

Postby LKirby » Fri Aug 28, 2015 3:10 pm

I've got a question on the Client API and what happens when the user's session is timed out.


When using the Client API after the Client session has expired e.g

Code: Select all

var result = $eb.executeFunction("functionName", params)
// Do something with the result but result is undefined here 
executeFunction doesn't return anything for an expired session but the HTTP Status Code is 200 (OK) and the following JSON is returned to the client but never gets back to the function calling to the client api:

Code: Select all

{"forwardToErrorUrl":"http://localhost:3030/ufs/ufs_timeout_page.htm","goToUrl":null}
I don't know if this has been changed in Ebase v5 but in v4 is there an option to to redirect to the forwardToErrorUrl value in the event of a session timeout?

Otherwise the user may not realise their session has expired. I was thinking if it would be possible to return a HTTP Status of 401 or 403 instead of 200 OK and then redirect to that page? I've looked at the Client API guide but there is no mention of what happens in the event of a session timeout when using the api. When clicking a button /element on a form that doesn't use the client api, the browser gets redirected correctly to the redirect target url page but when using the client api and the session has timed out, nothing happens.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Sep 01, 2015 10:18 am

I've entered this as a bug in our system. It looks like the system has recognised the timeout but isn't displaying the timeout page - possibly because the refresh page option is not used on the executeFunction call. But it seems reasonable that the user should be shown the timeout page regardless. V5 is the same as V4 in this regard.
0 x


Who is online

Users browsing this forum: No registered users and 6 guests