Adobe COLDFUSION 9 Manual page 357

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Using the Dreamweaver Login Wizard
ColdFusion installs a Login Wizard command in the Dreamweaver Commands menu that generates a skeleton set of
pages for managing user authentication and authorization.
The wizard asks you to select how to authenticate the login information. Select one of the following options:
• Simple Specify a single user ID and password in the wizard. All users must enter this information to log in. Use
this option for testing, or 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 Specify an NT domain in the wizard, and the wizard generates code that queries the domain.
• LDAP Specify the LDAP server and port, the user name and password required to access the login data, and the
distinguished name to use to start the search for the user name. 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:
If this file does not exist, the wizard creates it with a single
Application.cfc
specify an application name or any other methods. If the file exists, but does not have an
adds the method. If Application.cfc and the
beginning of the method. The resulting
mm_wizard_application_include.cfm; it also has a simple form with a logout button, which appears at the top of each
page in the application.
Note: If the wizard creates the Application.cfc file, change the file to specify the application name. For more information
on Application.cfc, see
"Designing and Optimizing a ColdFusion
mm_wizard_application_include.cfm
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
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
and calls the required authentication method. If the authentication method's return argument indicates a valid
user, the method logs the user in.
• The logout method logs out a user. If you specified Browser Dialog Box as the login page type, it also calls the
closeBrowser method to close the browser window. This behavior is necessary because the browser continues to
send the old login credentials after the user logs out, and the
user in again.
• The closeBrowser method closes the browser window or tells the user to close the browser window to complete the
logout, depending on the browser type.
onRequestStart
onRequestStart
The Login Wizard uses the information specified in the wizard fields to set
This CFC contains all of the user authentication and login logic. The CFC consists of the
Last updated 8/5/2010
onRequestStart
method exist, the wizard inserts the required code at the
method has a
tag that specifies
cfinclude
Application" on page 235.
tag, which displays the login form
cflogin
tag will automatically use them and log the
cflogin
method; it does not
method, it
onRequestStart
352

Advertisement

Table of Contents
loading

Table of Contents