Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.0

WebsydianExpress - Callback Point


IsSessionInIntranet

Type

Site specific callback point implemented by the WebsydianExpress runtime.

When is the callback point called

IsSessionInIntranet is called just after the session is created by an initial request from a browser and just before roles and folder list are assigned to the session. Here it is determined whether the request originates from the intranet or outside the intranet.

How does the callback point influence later functionality

The callback function returns a flag IsIPInIntranet, set this flag to No if you don't want to have any intranet roles assigned to the session.

In this way, you can ensure that only requests specific IP-addresses will be allowed to e.g. access the administration interface.

If more than one callback function is specified for the callback point, the last callback function called will determine whether IsIPInIntranet is set to yes or no. To aid in this decision, the result of the call of the previous callback function is entered as a value in the CallbackInput<IsIpInIntranet> field.

It is up to the callback function to either disregard this value or to take it into account when deciding the state of the IsIPInIntranet flage that is returned to the caller.

The value for CallbackInput<IsIPInIntranet> for the first callback function is the result of the standard WebsydianExpress determination of whether a session is an intranet session or not. This is determined based on the site setting IP Intranet Mask.

Example of use

If your intranet is organized as several different subnets, you can control the intranet mask for each subnet in a callback function for this callback point. Find the IP address for the session by using the CallbackInput<APIFields.SessionSurrogate> to call the API APIServer.GetBasicSessionData.

Compare this IP-address with a IP mask of each subnet you want to handle as valid parts of the intranet. If the IP-address is valid according to one of these masks, you should set CallbackOutput<IsIPInIntranet> to Yes - if not, set it to yes.

Abstract callback function

Inherit from Callback.Server.IsSessionInIntranet.AbstractCallbackFunction to create a callback function that can be called by this callback point.

CallbackInput

This local variable contains:

These fields will be populated automatically by the callback function. Use the value of the fields as you would use normal input fields.

CallbackOutput

This local variable contains:

You must populate this value before the program terminates. The value will be automatically transferred to the callback point.