Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SEC-978: Add onSuccessfulAuthentication to AbstractPreAuthenticatedProcessingFilter #1230

spring-issuemaster opened this Issue Sep 17, 2008 · 2 comments


None yet
1 participant

Rory Winston(Migrated from SEC-978) said:

I would like to be able to add specific behaviour on successful authentication. I have a custom filter which is a subclass of AbstractPreAuthenticatedProcessingFilter, and I would like to be able to override or at least extend the behaviour of successfulAuthentication(). Would it be possible to add some kind of template onSuccessfulAuthentication method in the base class that could be called within successfulAuthentication()?

e.g. abstract void onSuccessfulAuthentication(HttpServletRequest request ….. )

within successfulAuthentication():


At the moment I cant find a way to override this in my subclasses.

Luke Taylor said:

You can already override the behaviour of successfulAuthentication since it’s a protected method. Is there some additional requirement that you have? I can’t really see what would prevent you from overriding the behaviour as it stands.

Luke Taylor said:

I can’t see any requirement for this, given that the current successfulAuthentication method is effectively just:

protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) {
if (this.eventPublisher != null) {
eventPublisher.publishEvent(new InteractiveAuthenticationSuccessEvent(authResult, this.getClass()));

and is already protected.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 M1 milestone Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment