The mgiAuthenticate Tag
Tag Behavior
Use the mgiAuthenticate tag to password-protect individual
pages by displaying an authentication dialogue box and requiring
a username and password. If the authentication fails (i.e. the
username or the password does not match those coded in the tag),
an error page is displayed.
Tag Syntax
The mgiAuthenticate tag has two required parameters and no
optional parameters. The tag form is:
<mgiAuthenticate username="Name" password="Code">
Required Parameters:
- username - The username is the authorized login (i.e.,
name) necessary to access the page containing the mgiAuthenticate
tag. The username must be unique. The username is case-sensitive
and can consist of letters, numbers, multiple words, spaces and
ASCII characters.
- password - The password is the authorized security
code necessary to access the page containing the mgiAuthenticate
tag. The password is case-sensitive and can consist of letters,
numbers, multiple words, spaces and ASCII characters. A secure
password should contain at least 8 characters and include both
numbers and letters.
Optional Parameters:
Example Usage and Output
<mgiAuthenticate username="Admin" password="39K2p2w8M">
In this example, the username and password required to access
a page are case-sensitive. The mgiAuthenticate tag, username parameter
and password parameter are placed in the HTML code of a page named
index.mgi. When a visitor accesses index.mgi, a dialogue box is
displayed requesting a User Name and Password.
If the username and password entered in the dialogue box match
the username and password coded in the parameters of the mgiAuthenticate
tag exactly, then the index.mgi page is displayed to the visitor.
If an incorrect username or password is entered in the dialogue
box, an error is displayed. If the correct username and password
is entered in the dialogue box with incorrect capitalization,
an error is displayed.
Suggested Usage
|