Another thing you can do with PostPostValidate
is injecting your own information into the session parameters table. Normally, these are collected using the endpoint detection mechanism (we spoke about customizing that in Chapter 3, Customizing Endpoint Detection and Policies), but you can add more right here using the function SetSessionParamWithType
. This function has the following syntax:
SetSessionParamWithType g_cookie, <Parameter Name>, <Parameter value>, <type of parameter>
This function also resides in \Von\InternalSite\Inc\SessionMgr.inc
and is used extensively by other code pieces.
This structure can be used to perform operations on data collected as part of the endpoint policy, or by the server itself, and then inject the results into the session itself. For instance, you can check the current time and convert the result to some flag or value. Once you put that flag back into the session, you can have the session policy allow or deny access to...