VM:Webgateway Web Server
Select where you want to go:

Reference - User Exits

GROUP
PASSWORD
USEREXIT Selector
VIWEXIT1—Worker Preparation
VIWEXIT2—Worker Cleanup
VIWEXIT3—Change a VM Password

GROUP User Exit


Calling Parameters | Return Codes | Skeleton User Exit

When VM:Webgateway encounters a GROUP USEREXIT access control record and one of the following access control records, it invokes a group user exit to determine to which groups a web browser user belongs:

The GROUP USEREXIT record identifies the name of the user exit to invoke. The user exit must reside on a minidisk or SFS directory accessed by the VM:Webgateway service virtual machine (typically the 191 minidisk).

You can give the user exit any valid CMS filename; the filetype of the user exit is EXEC.

You may have more than one group user exit. However, for each request to serve data, VM:Webgateway can use only one group user exit. VM:Webgateway should encounter only one GROUP access control record when processing a request to serve data.

Calling Parameters

VM:Webgateway passes the following argument to the user exit:

user_name

user_name
user name the web browser user entered when prompted by the web browser. VM:Webgateway authenticates the user name using the method specified on a previously encountered PASSWORD access control record before it is sent to the user exit. VM:Webgateway passes the user name to the user exit in the case specified on the PASSWORD record. For more information about the case the user name will be in, refer to the table that shows the effect of the PASSWORD record on identifying groups.

Return Codes

VM:Webgateway accepts these return codes from the user exit:

Return Code Meaning
0 The user name is a member of one or more groups

The user exit must stack the list of groups to which the userid belongs in one line. The line should contain one or more blanks between each group name.

4 The user name is not a member of any group.
8 Group membership could not be determined.

VM:Webgateway checks the program stack for the list of groups only if the return code is 0. Any other value (including values not listed above) causes VM:Webgateway to reject the request to serve the file.

Skeleton User Exit

The code below provides a skeleton user exit.

 /* Group User Exit                                  */
/* */
/* First, get the input argument. */
parse arg user.

/* Initialize variables. Assume: */
/* */
/* - User name is not a member of any group. */
/* - Information to determine group membership is */
/* available. */
/* */
Groups = ''
GroupFound = 0
InfoAvailable = 1

:
: {Place code here to determine group membership.}
:

/* User found in a group. */
/* Name of the group is in the variable */
/* GroupToCheck. */
GroupFound = 1
Groups = Groups GroupToCheck

:
:

/* Assign a return code. */
/* RC=0 User is a member of at least one group */
/* RC=4 User is not a member of any group */
/* RC=8 Membership could not be determined */
If GroupFound then Do
push Groups
Exit 0
End
Else
Exit 4
Exit 8

Top
Select where you want to go:

Copyright © 1998, Sterling Software, Inc.