Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

ValidateAndUpdateSession Function

The ValidateAndUpdateSession function is called for each web request (event) received by the Websydian application.  The function is called by the Session.EventDispatcher pattern in the 0 Security edit point.

The ValidateAndUpdateSession function checks if the received Session exists and if it is active.  The date and time of the last request of the Session is compared against a predefined time-out interval, and the Session is set to status Timed out if this interval is exceeded.  The time-out operation itself is performed by the function TimeOutSingleSession.

The function also receives an IP Address and which it compares with the stored IP Address for the Session.

If the Session exists, it is active, not timed-out and the IP Address is the same, the Session error status return field is set to OK and the Request count and Last session request date/time fields are updated.  Otherwise an error status is returned.

The ValidateAndUpdateSession function uses the the SetTimeOutInterval function scoped by the ValidateAndUpdateSession function to define its time-out interval.

Inheritance