|
@@ -137,11 +137,12 @@ public abstract class AbstractUserDetailsAuthenticationProvider
|
|
}
|
|
}
|
|
catch (UsernameNotFoundException ex) {
|
|
catch (UsernameNotFoundException ex) {
|
|
this.logger.debug(LogMessage.format("Failed to find user '%s'", username));
|
|
this.logger.debug(LogMessage.format("Failed to find user '%s'", username));
|
|
|
|
+ String message = this.messages.getMessage("AbstractUserDetailsAuthenticationProvider.badCredentials",
|
|
|
|
+ "Bad credentials");
|
|
if (!this.hideUserNotFoundExceptions) {
|
|
if (!this.hideUserNotFoundExceptions) {
|
|
throw ex;
|
|
throw ex;
|
|
}
|
|
}
|
|
- throw new BadCredentialsException(this.messages
|
|
|
|
- .getMessage("AbstractUserDetailsAuthenticationProvider.badCredentials", "Bad credentials"));
|
|
|
|
|
|
+ throw new BadCredentialsException(message, ex);
|
|
}
|
|
}
|
|
Assert.notNull(user, "retrieveUser returned null - a violation of the interface contract");
|
|
Assert.notNull(user, "retrieveUser returned null - a violation of the interface contract");
|
|
}
|
|
}
|