
150 Data Services
Login commands
For custom authentication, Flex uses a custom login adapter, known as a login command, to
check a principal’s credentials and let that principal log into the application server. A login
command must implement the flex.messaging.security.LoginCommand API.
Flex 1.5 and Flex 2 include default login command implementations for Adobe JRun, BEA
WebLogic, IBM WebSphere, Apache Tomcat, and Oracle. In Flex 1.5, these were stored in
the gateway-config.xml file. You could add your own custom login commands to that file.
In Flex 2, the gateway-config.xml file no longer exists. The default login commands are now
in the
<security> block of the services-config.xml file. To migrate custom login commands,
you must move them to this location. Use the TomcatLoginCommand class for either Tomcat
or JBoss.
The following example shows the
<security> section of the services-config.xml file. This is
where you move custom login commands. You should enable only one login command at a
time; comment out all others.
<security>
<login-command class="flex.messaging.security.JRunLoginCommand"
server="JRun"/>
<!--
<login-command class="flex.messaging.security.TomcatLoginCommand"
server="Tomcat"/>
<login-command class="flex.messaging.security.WeblogicLoginCommand"
server="Weblogic"/>
<login-command class="flex.messaging.security.WebSphereLoginCommand"
server="WebSphere"/>
-->
</security><>
Mapping Java types for RemoteObject
When an ActionScript type is not handled implicitly, you can map it to a typed Java class of
the same name on the server.
In Flex 1.5, you create a static variable in the ActionScript class that uses the
Object.registerClass() method to specify the fully qualified name of the corresponding
Java class on the server. The first parameter of the
registerClass() method is the fully
qualified name of the Java class; the second parameter is the fully qualified name of the
ActionScript class.
Comentários a estes Manuais