
148 Data Services
Flex 2 syntax
In Flex 2, you specify the URI of the channel endpoint for which you want to require
authentication as the
url-pattern. You use the value of the channel definition’s endpoint
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 “Named RemoteObject” on page 139.
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.
Kommentare zu diesen Handbüchern