+
+ m_radius.asyncSend(makeResponse(*packet), source, [this](const auto& ec){ handleSend(ec); });
+}
+
+bool Server::findUser(const RadProto::Packet& packet)
+{
+ std::string login;
+ std::string password;
+ for (const auto& attribute : packet.attributes())
+ {
+ if (attribute->type() == RadProto::USER_NAME)
+ login = attribute->toString();
+
+ if (attribute->type() == RadProto::USER_PASSWORD)
+ password = attribute->toString();
+ }
+
+ User* user = nullptr;
+ if (m_users->FindByName(login, &user))
+ {
+ m_logger("User '%s' not found.", login.c_str());
+ printfd(__FILE__, "User '%s' NOT found!\n", login.c_str());
+ return false;
+ }
+
+ printfd(__FILE__, "User '%s' FOUND!\n", user->GetLogin().c_str());
+
+ if (password != user->GetProperties().password.Get())