|
NetBurner 3.5.8
PDF Version |
Example Path: examples/Web/HtmlPassword
Web page user names and passwords are controlled by "Access Group" levels that can range from 0 to 255, with 0 being no password protection. There are 3 methods to set the Access Group levels as described below. An time Access Groups are used in an application, the CheckHttpAccess() function must be created in the application to process the access groups and determine if access should be granted. The function is defined as:
.
For dynamic web content, create a HTML GET handler callback function. If you do not have a web page compiled into an application in which to put an ACCESSGROUP tag, the access group can be specified in the handler callback function declaration:
For example, if you have a dynamically created page for administration of users and passwords that generates a list of such information the access group could be set to 1 in the callback declaration:
For reference, a GET callback declaration with no access group specified defaults to 0 and only needs the first two parameters:
Creatr a dynamic HTML POST handler callback function:
Similar to the GET handler above, creating a callback with no access group relies on ACCESSGROUP tags:
And specifying the access group for a post can also be used:
The application consists of an index page with links to three additional pages with access group numbers: 0, 1 and 2.
The function
is used to authenticate the user names and passwords. If you create a function with this signature, it will be called any time one of the following access group tags are encountered in a web page:
Any web pages without an ACCESSGROUP tag will default to open access.