views:

163

answers:

1

We're using :

  • JBoss 5
  • Flex SDK 3.5
  • BlazeDS 3, with integrated authentication (through JAAS and JBossSX)

Failed login are always indicated to the flex client by the same fault code : Client.Authentication

However, the underlying JAAS LoginModule throws a specific javax.security.auth.login.LoginException subclass.

How can we propagate the failed login reason to the flex client ?

A: 

BlazeDS knows how to serialize your Throwable object. You can throw a custom exception from Java, add a fault handler to your remote object in Flex and you can recover your exception from the FaultEvent event.

Cornel Creanga