-
1. Re: Passing login failure cause to the client side
anbenham Dec 13, 2004 5:01 AM (in response to anbenham)I found some infos in this thread:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=57240
but unfortunately not really helpfull. -
2. Re: Passing login failure cause to the client side
starksm64 Dec 14, 2004 12:47 AM (in response to anbenham)Add a custom interceptor that changes the SecurityException to the exception thrown from the login module as obtained from the SecurityAssociation.getContext().
-
3. Re: Passing login failure cause to the client side
_alex Dec 14, 2004 6:37 AM (in response to anbenham)You have to parse the stack of incoming exceptions, beggining with the remote exception. In addition you can substitute the default security interceptor with your own, which will throw more detailed exceptions...
Alexander -
4. Re: Passing login failure cause to the client side
sberna Dec 15, 2004 1:44 PM (in response to anbenham)Hello,
I have the same problem getting the exact exception cause on the client side.
If you are lucky your client will run on the same VM that the logincontext does. In that case you might use
Object exception = org.jboss.security.SecurityAssociation.getContextInfo("org.jboss.security.exception");
System.out.println("exception:"+exception);
The exception obtained is the original exception thrown by the LoginModule and you can insert your own code based upon that exception (rethrow it for example).
In my case i use ejb services accessed from a remote machine and that exception is not available on the remote client :(.
As requested by Scott i have opened a Jira requesting this feature for the client. Please vote for it so that they can correct it.
http://jira.jboss.com/jira/browse/JBAS-47