SEC-1940: ProviderManager publishes any AccountStatusException
Previously there was a bug introduced by SEC-546 that prevented any AccountStatusException from being published. Now AccountStatusExceptions are also published.
This commit is contained in:
@@ -197,7 +197,6 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar
|
||||
new Object[] {toTest.getName()}, "No AuthenticationProvider found for {0}"));
|
||||
}
|
||||
|
||||
eventPublisher.publishAuthenticationFailure(lastException, authentication);
|
||||
prepareException(lastException, authentication);
|
||||
|
||||
throw lastException;
|
||||
@@ -205,6 +204,7 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void prepareException(AuthenticationException ex, Authentication auth) {
|
||||
eventPublisher.publishAuthenticationFailure(ex, auth);
|
||||
ex.setAuthentication(auth);
|
||||
|
||||
if (clearExtraInformation) {
|
||||
|
||||
Reference in New Issue
Block a user