DefaultAuthenticationEventPublisher will drop any exceptions that it doesn't have mapped. This means that an application needs to use setAdditionalExceptionMappings to provide any mappings not provided by default.
It would be nice to be able to configure a default event that gets fired for any unmapped exceptions:
DefaultAuthenticationEventPublisher publisher = new DefaultAuthenticationEventPublisher();
publisher.setDefaultAuthenticationFailureEvent(AuthenticationFailureBadCredentialsEvent.class);
With the above configuration, an AuthenticationFailureBadCredentialsEvent would be fired in the event that the published exception doesn't map to anything in DefaultAuthenticationEventPublishers mappings.
DefaultAuthenticationEventPublisher would change at around this point:
if (constructor != null) {
try {
event = constructor.newInstance(exception, authentication);
} catch // ...
}
Where the event gets constructed.
Comment From: zeeshanadnan
@jzheaux if nobody is currently working on this can i work on this?
Comment From: jzheaux
Yes, sir! It's yours.