Session variables
With the following control API commands it is possible to add and remove arbitrary name/value pairs, so-called session variables, to the Airlock Gateway session. These variables can be used in Client Fingerprinting rules or can be sent to the back-end as environment cookies.
SET_SESSION_VARIABLES: set variables in the session (clear existing variables).ADD_SESSION_VARIABLES: add variables to the session (keep existing variables).REMOVE_SESSION_VARIABLES: remove variables from the session
Example
The command syntax is:
;; SET_SESSION_VARIABLES, ADD_SESSION_VARIABLES, REMOVE_SESSION_VARIABLES
session-variable-command = session-variable-command-name "=" session-variable-command-value
session-variable-command-name = "SET_SESSION_VARIABLES" | "ADD_SESSION_VARIABLES" | "REMOVE_SESSION_VARIABLES"
session-variable-command-value = session-variable-definitions
session-variable-definitions = session-variable-definition [ "," session-variable-definitions ]
;at this place each 'session-variable-definition' must be percent encoded
session-variable-definition = session-variable-name [ "=" session-variable-value ]Example:
The pseudo code example below shows how to set and remove session variables using the control API.
Example
Pseudo code:
response.header="Set-Cookie: AL_CONTROL="+URL_Encode("SET_SESSION_VARIABLES="+URL_Encode("myVariable1=myValue1")+","
+URL_Encode("myVariable2=myValue2"))Results in:
Set-Cookie: AL_CONTROL=SET_SESSION_VARIABLES%3DmyVariable1%253DmyValue1%2CmyVariable2%253DmyValue2Example
Pseudo code:
response.header="Set-Cookie: AL_CONTROL="+URL_Encode("REMOVE_SESSION_VARIABLES="+URL_Encode("myVariable1")+","+URL_Encode("myVariable2"))Results in:
Set-Cookie: AL_CONTROL=REMOVE_SESSION_VARIABLES%3DmyVariable1%2CmyVariable2