Skip to content

Latest commit

 

History

History
47 lines (43 loc) · 2.36 KB

web_cookieHeader.md

File metadata and controls

47 lines (43 loc) · 2.36 KB

Method : web_cookieHeader

Scope : private

Description :

This function the "setCookie" header

Parameters :

Parameter Direction Name Type Ddescription
$0 OUT setCookieHeadere TEXT set cookie header (e.g. "Set-Cookie: 4DSID_Demo_DB=df56a47ae0df4a42a5e6c0c09475948c; Path=/; MaxAge=28800; HttpOnly")
$1 IN sessionId TEXT session id (e.g. "4DSID_Demo_DB=df56a47ae0df4a42a5e6c0c09475948c")

Notes :

   in 4D v18 : "Set-Cookie: 4DSID=B5BE45DB42184E74BC52F4B4994AB16B; Path=/; Max-Age=28800; HttpOnly; Version=1"
   in 4D v18 with option  
       WEB SET OPTION(Web Session cookie domain;"/localhost")  // "/*.4d.fr"
   "Set-Cookie: 4DSID=1ed7ecbed8ff4dca9d639d4d74956f18; Domain=/localhost; Path=/; Max-Age=28800; HttpOnly; Version=1"
   in 4D v18 with options  
       WEB SET OPTION(Web Session cookie domain;"/localhost")  // "/*.4d.fr"
       WEB SET OPTION(Web session cookie name;"4dSessionId")
   "Set-Cookie: 4dSessionId=1ed7ecbed8ff4dca9d639d4d74956f18; Domain=/localhost; Path=/; Max-Age=28800; HttpOnly; Version=1"
   in 4D v18 with options 
       WEB SET OPTION(Web Session cookie domain;"/localhost")  // "/*.4d.fr"
       WEB SET OPTION(Web session cookie name;"4dSessionId")
       WEB SET OPTION(Web Session cookie path;"/test.html")
  "Set-Cookie: 4dSessionId=1ed7ecbed8ff4dca9d639d4d74956f18; Domain=/localhost; Path=/test.html; Max-Age=28800; HttpOnly; Version=1"
   in 4D v18 with options 
       WEB SET OPTION(Web inactive session timeout;481)
       WEB SET OPTION(Web Session cookie domain;"/localhost")  // "/*.4d.fr"
       WEB SET OPTION(Web session cookie name;"4dSessionId")
       WEB SET OPTION(Web Session cookie path;"/test.html")
       WEB SET OPTION(Web inactive session timeout;481)
  "Set-Cookie: 4dSessionId=1ed7ecbed8ff4dca9d639d4d74956f18; Domain=/localhost; Path=/test.html; Max-Age=28860; HttpOnly; Version=1"

Example :

web_cookieHeader
      
        C_TEXT($vt_sessionId)
        $vt_sessionId:=Lowercase(Generate UUID)
      
        web_cookieHeader ("4DSID_Demo_DB="+$vt_sessionId)

Version :

1.00.00

Author :

Bruno LEGAY (BLE) - Copyrights A&C Consulting 2021

History :

    CREATION : Bruno LEGAY (BLE) - 28/07/2021, 09:26:56 - 2.00.02