Exploring Flex

Posts Tagged ‘coldfusion’

Secure operations in a CFC

Posted by hneelu on June 11, 2009

Create an Application.cfm file and place it in folder called ‘SecureCF’

<cfapplication name=”authTest” />
<cfif isDefined(“cflogin”)>
<cfif cflogin.name eq “admin” and
cflogin.password eq “admin”>

<cfloginuser name=”#cflogin.name#”
roles=”admin” /></cfif></cfif>

In the same folder, add the required CFC file.

Modify the required operation as follows:

<cffunction name=”sayHelloArray” access=”remote” returnType=”array” roles=”admin”>

You can add any number of roles in the CFM file and use them accordingly.

NOTE: Only one role per operation is allowed.

Posted in coldfusion | Tagged: , | 1 Comment »