Flex 2 syntax
In Flex 2, you specify the URI of the channel endpoint for which you want to require
authentication as the
URI in the services-config.xml file. The boldface text in the following example shows a URI
that requires authentication:
<web-app>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Channel</web-resource-name>
<url-pattern>/messagebroker/amf</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>manager</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
Migrating services that use custom authentication
This section describes how to migrate a RemoteObject tag that used custom authentication
from Flex 1.5 to Flex 2. This section assumes that you have already migrated the named
RemoteObject as described in
You could previously only use custom authentication with named RemoteObjects. Now you
can use custom authentication with all service types. You do not modify web.xml to lock
down a URL in this sort of authentication.
148
Data Services
. You use the value of the channel definition's endpoint
url-pattern
"Named RemoteObject" on page
139.
Need help?
Do you have a question about the FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 and is the answer not in the manual?
Questions and answers