@Override public boolean validateUser(String username, String password) { User user = this.userCurator.findByLogin(username); String hashedPassword = Util.hash(password); if (user != null && password != null && hashedPassword != null) { return hashedPassword.equals(user.getHashedPassword()); } return false; }