Hi! I'm really __struggling__ to get this to work and I'm trying to modify the user authentication so that this scenario would be supported: * The app shows login window with input fields for username and password * User enters his username and password and presses Login-button * Flex ends up to my custom login command that determines if username and password is correct and if they are it checks if the user is required to enter pin code also. If he is, then the login command would throw a custon exception that is catched in the application and a dialog for entering the pin code is presented. After that it ends up back to the custom login command and it verifies the pin and sets up the user principal to the flex client and authentication is complete. * If the user is not required to enter a pin code, then authentication is sufficient with correct username and password.
The problem here is that if I try to send SecurityException with any other code than Client.Authentication, Flex decides for me that the request failed with some sort of Ping problem!!! On the other hand, if I set the code to be Client.Authentication and message to anything Flex always changes it to "Login required before authorization can proceed.". This causes the fact that I cannot determine if the authentication fail was caused by wrong username/password or that the pin is required and therefore I will never know when to show the regular login dialog and when to show the pin entering dialog! Is there any way to throw a customized SecurityException from the login command that actually gets to the client as it is and not modified by Flex or is there any other way to do this with the LoginCommand? -Mika

