You are not logged in.
I changed class definition from:
TSQLAuthUserEx = class(TSQLAuthUser)
public
SessionData: string;
end;to
TSQLAuthUserEx = class(TSQLAuthUser)
private
fSessionData: string;
published
property SessionData: string read fSessionData write fSessionData;
end;Now my methods SetDataToUserSession, GetDataFromUserSession works.
Offline
Does framework automatically delete session objects from ORM when session timeout happen?
Or i must inherit server class and use OnSessionClosed event?
For test purpose i set SQLAuthGroup.SessionTimeout := 1.
Client app was successfully authenticated and authorized which mean, SessionTimeout was applied.
Next, from client i call server method SetDataToUserSession which save string on server side to TSQLAuthUserEx.SessionData field, then i close client app.
After 2 min i connect again and call GetDataFromUserSession.
SessionData still exists..
Offline
You are storing the data (fSessionData) to the TSQLAuthUser object, not in session context here.
Have a look at "ServiceContext: TServiceRunningContext;" declaration in mORMot.pas to read more about session context.
Last edited by oz (2016-06-20 12:05:37)
Offline
Yes, you right. Thanks.
Offline
Hello!
I found that my test project was included in ThirdPartyDemos, which is not bad ![]()
But it's modified version. would be correct if source code will be moved to author folder (Alf?).
Besides, this url not work: https://github.com/LongDirtyAnimAlf/mORMot.REST
If "\ThirdPartyDemos\George\REST-Tester" folder will persist, i would like to see unchanged source.
For example, there should be as well "Win32/Debug/enable_https" folder with test certificate and bat files to install/uninstall it.
I have problems with free time currently, but in future, possibly, i will upload some updates to my git repository (there is few undone 2do entries).
Offline