MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual do Utilizador Página 148

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 184
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 147
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 definitions 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.
Vista de página 147
1 2 ... 143 144 145 146 147 148 149 150 151 152 153 ... 183 184

Comentários a estes Manuais

Sem comentários