CFAUTHENTICATE  
 
 

The CFAUTHENTICATE tag authenticates a user, setting a security context for the application.

 
 
  Syntax  
 
<CFAUTHENTICATE SECURITYCONTEXT="context"
    USERNAME="user ID"
    PASSWORD="password"
    SETCOOKIE="yes/no" 
    THROWONFAILURE="yes/no">

SECURITYCONTEXT

Required. Security context with which the specified user is authenticated. This context must have been previously defined in the security system.

USERNAME

Required. User to be authenticated.

PASSWORD

Required. Password for the user.

SETCOOKIE

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.

THROWONFAILURE

Optional. Default is Yes. Indicates whether ColdFusion throws an exception (of type SECURITY) if authentication fails.

 
 
  Usage  
 

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.





 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.