How to catch FailedLoginException in Picketbox/Undertow on Wildfly 8 to apply CORS
With the help of a ContainerResponseFilter I am able to apply CORS headers to all outgoing Responses, and with an ExceptionMapper I can do the same on all Errors and Exceptions, except for any authentication related Exceptions that Picketbox/Undertow is supposed to throw in Wildfly. My ExceptionMapper never catches it no matter what I try, and as a result, the frontend can't read the 401 status since the response doesn't have the CORS headers appended (the XHR HTTP status code just becomes 0). I am using this PBKDF2 setup to authenticate against a MySQL database, and at first I thought that