Customizing authentication pages

Authentication pages are HTML files. Local portal authentication requires the following authentication pages:

You must customize the authentication pages, including the page elements that the authentication pages will use, for example, back.jpg for authentication page Logon.htm.

Follow the authentication page customization rules when you edit the authentication page files.

File name rules

The names of the main authentication page files are fixed (see Table 14). You can define the names of the files other than the main authentication page files. File names and directory names are case insensitive.

Table 15: Main authentication page file names

Main authentication page

File name

Logon page

logon.htm

Logon success page

logonSuccess.htm

Logon failure page

logonFail.htm

Online page

Pushed after the user gets online for online notification

online.htm

System busy page

Pushed when the system is busy or the user is in the logon process

busy.htm

Logoff success page

logoffSuccess.htm

Page request rules

The local portal Web server supports only Get and Post requests.

Post request attribute rules

  1. Observe the following requirements when editing a form of an authentication page:

    • An authentication page can have multiple forms, but there must be one and only one form whose action is logon.cgi. Otherwise, user information cannot be sent to the local portal Web server.

    • The username attribute is fixed as PtUser. The password attribute is fixed as PtPwd.

    • The value of the PtButton attribute is either Logon or Logoff, which indicates the action that the user requests.

    • A logon Post request must contain PtUser, PtPwd, and PtButton attributes.

    • A logoff Post request must contain the PtButton attribute.

  2. Authentication pages logon.htm and logonFail.htm must contain the logon Post request.

    The following example shows part of the script in page logon.htm.

    <form action=logon.cgi method = post >
    <p>User name:<input type="text" name = "PtUser" style="width:160px;height:22px" maxlength=64>
    <p>Password :<input type="password" name = "PtPwd" style="width:160px;height:22px" maxlength=32>
    <p><input type=SUBMIT value="Logon" name = "PtButton" style="width:60px;" onclick="form.action=form.action+location.search;">
    </form>
    
  3. Authentication pages logonSuccess.htm and online.htm must contain the logoff Post request.

    The following example shows part of the script in page online.htm.

    <form action=logon.cgi method = post >
    <p><input type=SUBMIT value="Logoff" name="PtButton" style="width:60px;">
    </form>
    

Page file compression and saving rules

You must compress the authentication pages and their page elements into a standard zip file.

Redirecting authenticated users to a specific webpage

To make the device automatically redirect authenticated users to a specific webpage, do the following in logon.htm and logonSuccess.htm:

  1. In logon.htm, set the target attribute of Form to _blank.

    See the contents in gray:

        <form method=post action=logon.cgi target="_blank">
    
  2. Add the function for page loading pt_init() to logonSucceess.htm.

    See the contents in gray:

        <html>
        <head>
        <title>LogonSuccessed</title>
        <script type="text/javascript" language="javascript" src="pt_private.js"></script>
        </head>
        <body onload="pt_init();" onbeforeunload="return pt_unload();">
        ... ...
        </body>
    </html>