home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cfauthenticate.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.0 KB  |  39 lines

  1. <!--- This view-only example shows the use of CFAUTHENTICATE
  2. in an Application.cfm file --->
  3. <HTML>
  4. <HEAD>
  5. <TITLE>CFAUTHENTICATE Example</TITLE>
  6. </HEAD>
  7.  
  8. <BODY>
  9. <H3>CFAUTHENTICATE Example</H3>
  10. <P>The CFAUTHENTICATE tag authenticates a user and sets the
  11. security context for an application.
  12. <P>Code this tag in the Application.cfm file to set a
  13. security context for your application. 
  14. <P>This is a view-only example. Refer to the commented
  15. source code to see what you might code for 
  16. CFAUTHENTICATE.
  17.  
  18. <!--- This code is from an Application.cfm file --->
  19. <!---
  20. <CFIF NOT IsAuthenticated()>
  21.   <CFTRY>
  22.   <CFAUTHENTICATE SECURITYCONTEXT="Allaire" USERNAME=#user#
  23.     PASSWORD=#pwd#>
  24.   <CFCATCH TYPE="Security">
  25.   <H3>Authentication error</H3>
  26.     <CFOUTPUT> --->
  27.     <!--- Display the message. Alternatively, you might place
  28.       code here to define the user to the security domain. --->
  29. <!---
  30.     <P>#CFCATCH.message#
  31.     </CFOUTPUT>
  32.   </CFCATCH>
  33.   </CFTRY>
  34. </CFIF>
  35. <CFAPPLICATION NAME="Personnel">
  36. --->
  37.  
  38. </BODY>
  39. </HTML>