authnResultErrors.add(
new AuthenticationFailureCause( AuthenticationConstants.AUTHN_MUST_CHANGE_PASSWORD_EXCEPTION,
e.getMessage() ) );
}
PasswordEncoder encoder = securityPolicy.getPasswordEncoder();
log.debug( "PasswordEncoder: {}", encoder.getClass().getName() );
boolean isPasswordValid = encoder.isPasswordValid( user.getEncodedPassword(), source.getPassword() );
if ( isPasswordValid )
{
log.debug( "User {} provided a valid password", source.getUsername() );
try