![]() ![]() ![]() |
The CFAUTHENTICATE tag authenticates a user, setting a security context for the application.
<CFAUTHENTICATE SECURITYCONTEXT="context" USERNAME="user ID" PASSWORD="password" SETCOOKIE="yes/no" THROWONFAILURE="yes/no">
Required. Security context with which the specified user is authenticated. This context must have been previously defined in the security system.
Required. User to be authenticated.
Required. Password for the user.
Optional. Default is Yes. Indicates whether ColdFusion sets a cookie to contain authentication information. This cookie is encrypted and its contents include user name, security context, browser remote address, and the HTTP user agent.
Optional. Default is Yes. Indicates whether ColdFusion throws an exception (of type SECURITY) if authentication fails.
Code this tag in the Application.cfm file to set a security context for your application.
Call the IsAuthenticated function to determine if the user has been authenticated. If you specify No for SETCOOKIE, you must call CFAUTHENTICATE for every page in the application (perhaps in an Application.cfm file).
If you specify THROWONFAILURE=Yes, you can enclose CFAUTHENTICATE in a CFTRY/CFCATCH block to handle possible exceptions programmatically.
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.