#1 2018-01-16 14:49:53

array81
Member
From: Italy
Registered: 2010-07-23
Posts: 411

Cookies and expire by date on web application

On documentation I found information about cookies bit I found only expire by session. Is there a way to implement expire by date? My login form have a checkbox "remember me".
If user check it the browser shuold remember login for 10 days or until he doens't use logout button. In alternative cookies should work by session (until userver is working).

I know this method is noto safe by I'd like that user can choose it.

Offline

#2 2018-01-17 12:59:33

oz
Member
Registered: 2015-09-02
Posts: 95

Re: Cookies and expire by date on web application

You can specify your desired timeout in TMVCSessionWithCookies.Initialize(PRecordData,PRecordTypeInfo: pointer; SessionTimeOutMinutes: cardinal): integer;
Param: SessionTimeoutMinutes.

Offline

#3 2018-01-17 18:17:22

array81
Member
From: Italy
Registered: 2010-07-23
Posts: 411

Re: Cookies and expire by date on web application

oz wrote:

You can specify your desired timeout in TMVCSessionWithCookies.Initialize(PRecordData,PRecordTypeInfo: pointer; SessionTimeOutMinutes: cardinal): integer;
Param: SessionTimeoutMinutes.

SessionTimeoutMinutes: "you can supply a time period, after which the session will expire - default is 1 hour" (from document) this is duration of the session.
After this time the session is close. So I cannot use for my use.

I would like my user to choose between session approach (more safe) and classic cookies approach.

Offline

Board footer

Powered by FluxBB