To authenticate users when using the LiveCycle Data Services ES assembler, you use the Flex setRemoteCredentials() method on the DataService object. The credentials, which are in the FlexSession object, are passed to the ColdFusion application, where you can use the cflogin tag to perform authentication. Alternatively, you can set credentials in the Flex destination, although it is not the recommended way to do so.
You can set the credentials by doing either of the following:

  • Specifying credentials in ActionScript
  • Specifying credentials in the Flex destination

Specifying credentials in ActionScript

To specify credentials in ActionScript, you use the setRemoteCredentials() method, as the following example shows:

ds = new DataService("mydest");
ds.setRemoteCredentials("wilsont", "password");

Specifying credentials in the Flex destination

To specify credentials in the Flex destination, you edit the data-management-config.xml file that is in the WEB-INF/flex folder of the server on which you run the Flex application. In the properties element, you include the remote-username and remote-password elements, as follows:

<destination id="cfcontact">
<adapter ref="coldfusion-dao" />
<channel ref="cf-dataservice-rtmp" />

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy