The mgiAuthenticate Tag

Tag Behavior

The mgiAuthenticate tag password-protects 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="Name" where "Name" is a case-sensitive, login identification that can consist of multiple words and spaces.
  • password="Code" where "Code" is a case-sensitive, alpha-numeric password.

Optional Parameters:

  • None.


Example Usage and Output

<mgiAuthenticate username="Anonymous" password="4JrPc378">

In this example, the mgiAuthenticate tag is placed in the HTML code of a page named index.html. When a visitor accesses index.html, a dialogue box is displayed requesting a Name and Password.

If the Name and Password entered in the dialogue box exactly matches the Username and Password coded in the mgiAuthenticate tag, the index.html page is displayed to the visitor. If the Name and Password entered in the dialogue box do not exactly match the Username and Password coded in the mgiAuthenticate tag, an error page is displayed.


Suggested Usage

  • Password Protection


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]