User Guide

22 Using the Flex Messaging Event Gateway
Authentication
Flex and ColdFusion provide the following authentication features for communicating
through the Flex Messaging event gateway:
Restricting IP addresses that are allowed to send a message through the Flex Messaging
event gateway
Specifying remote credentials in Flex, and then authenticating those credentials in
ColdFusion
Restricting IP addresses
To restrict the IP addresses from which your ColdFusion application accepts messages, you
must use a confiugration file, as specified in “Configuring a Flex Messaging event gateway
on page 15. In addition to specifying the destination and host, you specify the comma-
delimited list of IP addresses from which your ColdFusion application accepts messages.
Also, you can specify the allowed IPs for when you send messages from Flex to ColdFusion.
You do so in the destination definition in the messaging-config.xml file on the server on
which your Flex application is running. The following example is a sample destination:
<destination id="ColdFusionGateway">
<adapter ref="cfgateway"/>
<properties>
<gatewayid>*</gatewayid>
<gatewayhost>10.60.1.7</gatewayhost>
<allowedIPs>10.60.1.7,10.60.1.8,10.60.1.9</allowedIPs>
</properties>
<channels>
<channel ref="my-rtmp"/>
<channel ref="my-polling-amf"/>
</channels>
</destination>
Specifying remote credentials
The Flex application passes the username and password, which are set in the Flex application,
to the CFC. To authenticate users, you can then use the
cflogin tag. You put the cflogin
tag in an Application.cfm or Application.cfc file that executes when a method in the CFC is
called.
NOTE
The local machine is not included in the list of allowed IPs by default.