Adobe COLDFUSION 9 Manual page 353

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
<cflogin>
<cfif NOT IsDefined("cflogin")>
<cfheader statuscode="401">
<cfheader name="www-Authenticate" value="Basic
realm=""MM Wizard #args.authtype# Authentication""">
</cfif>
<cfabort>
<cfelse>
<!--- code to authenticate the user based on the cflogin.user and
cflogin.password values goes here. --->
</cflogin>
Log in a user using Flash Remoting
If you are developing a Rich Internet Application with Flash and Flash Remoting, your ColdFusion application does
not need to be coded specially for a Flash login. The Flash Remoting gateway makes the user ID and password available
to the
tag in the
cflogin
cflogin
In your Flash code, you use the ActionScript
Flash SWF file displays the user ID and password fields, and uses their contents in the
follows:
if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://localhost/flashservices/gateway");
gatewayConnection = NetServices.createGatewayConnection();
gatewayConnection.setCredentials(userID, password);
myService = gatewayConnection.getService("securityTest.thecfc", this);
}
For more information on using Flash Remoting, see
Remoting
Update" on page 619.
Logging out users
After a user logs in, the ColdFusion user authorization and authentication information remains valid until any of the
following happens:
• The application uses a
cflogout
button.
• If your application uses the Session scope for login information, the session ends.
• If your application does not use the Session scope for login information, the user does not request a new page for
the
tag
cflogin
idleTimeout
• If your application does not use Session scope for login information, or if you use J2EE-based session identification,
the user closes all browser windows.
Logging out a user by using the
does remove the login information (the Session.cfauthorization variable) from the Session scope. For more
information on ending sessions, see
structure.
SetCredentials
"Using the Flash Remoting
tag to log out the user, usually in response to the user clicking a log-out link or
period.
tag does not close the user's session, but if you use session login storage, it
cflogout
"Ending a
session" on page 315.
Last updated 8/5/2010
method to send login information to ColdFusion. Your
setCredentials
Service" on page 606 and
348
method, as
"Using Flash

Advertisement

Table of Contents
loading

Table of Contents