User Guide

Table Of Contents
Implementing user security 389
The wizard asks you to you select how to authenticate the login information. You can select one
of the following options:
Simple You specify a single user ID and password in the wizard. All users must enter this
information to log in. You can use this option for testing, or you can use the generated files as
a template where you can replace the authentication code with more complex code; for
example, to verify the ID and password against a database.
NT domain You specify an NT domain in the wizard, and the wizard generates code that
queries the domain.
LDAP You specify the LDAP server and port, the username and password required to access
the login data, and the distinguished name to use to start the search for the username. The
wizard generates the code to query the LDAP server with the user ID and password.
The wizard asks you to select one of the following options for displaying the request for login
information:
Browser Dialog Box
ColdFusion Login Form
Structure code generated by the Login Wizard
The wizard generates or modifies the following files in the directory or site that you specify:
Application.cfc If this file does not exist, the wizard creates it with a single onRequestStart
method; it does not specify an application name or any other methods. If the file exists, but does
not have an
onRequestStart method, it adds the method. If Application.cfc and the
onRequestStart method exist, the wizard inserts the required code at the beginning of the
method. The resulting
onRequestStart method has a cfinclude tag that specifies
mm_wizard_application_include.cfm; it also has a simple form with a logout button, which will
display at the top of each page in the application.
Note: If the wizard creates the Application.cfc file, you should, at least, change the file to specify the
application name. For more information on Application.cfc, see Chapter 13, “Designing and
Optimizing a ColdFusion Application,” on page 275.
mm_wizard_application_include.cfm
The Login Wizard uses the information specified in the
wizard fields to set several CFC method arguments. It then uses them to invoke the performlogin
method of the master login CFC, mm_wizard.authenticate.
mm_wizard_authenticate.cfc This CFC contains all of the user authentication and login logic.
The CFC consists of the following methods:
The ntauth, ldapauth, and simpleauth authentication methods check the user’s name and ID
against the valid login information, and return information about whether the user is
authenticated. For the details of how they authenticate the user and the specific return values,
see the methods.
The performLogin method is the master login method. It contains the cflogin tag, which
displays the login form and calls the required authentication method. If the authentication
method’s return argument indicates a valid user, the method logs the user in.