I have an application that makes used of a custom login module of JBoss. Authentication can fail for a wide variety of reasons and i have to display these to the user instead of the usual Inavlid username / password
error.
Is there a way to get error message from the login message? I think the best would be to through an exception since authenticate returns a boolean, however i can't figure how to catch it after authentication. Any pointers welcomes.
Used valve org.jboss.web.tomcat.security.ExtendedFormAuthenticator
and grabbed j_exception
from the session.
Ref: