Summary

When using WebSecurityConfigurerAdapter there currently seems to be no way to configure a custom event publisher.

Actual Behavior

WebSecurityConfigurerAdapter::getHttp currently always creates a new AuthenticationEventPublisher and overwrites the one set for the AuthenticationManager. There does not seem to be a way to modify that.

Expected Behavior

A custom event publisher set via configure(AuthenticationManagerBuilder) or similar should be honoured.

Version

Spring Security 5.1.6