diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-16 14:05:27 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-16 14:05:27 +0300 |
commit | 3627d42af059a52d2095efc783550fe589d68bcb (patch) | |
tree | 0ae26f664591260fa4e7754c2af9e4e45419e48a /client-qt/udm-client-qt/client_session.cpp | |
parent | 04edaab436dae1747270d7d10c0586a2a4c222bf (diff) |
server:
some initial work on authentification part
client-qt:
some initial work on authentification part
Diffstat (limited to 'client-qt/udm-client-qt/client_session.cpp')
-rw-r--r-- | client-qt/udm-client-qt/client_session.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client-qt/udm-client-qt/client_session.cpp b/client-qt/udm-client-qt/client_session.cpp index b5c6181..1d12172 100644 --- a/client-qt/udm-client-qt/client_session.cpp +++ b/client-qt/udm-client-qt/client_session.cpp @@ -216,6 +216,14 @@ void client_session::handle_connect(const boost::system::error_code &e) else { emit client_connected(true, QString::fromStdString(e.message())); + //TODO: something better ? + {// for now hust send auth request message + client_msg msg; + msg.set_type(CLIENT_MSG_TYPE::CLIENT_AUTH_REQUEST); + msg.mutable_auth_info()->set_hash_type(PASSWD_HASH_TYPE::HASH_SHA512); + msg.mutable_auth_info()->set_password(password_sha512.data()); + send_message(msg); + } //listen for messages from server recv_data_ = new char[4]; boost::asio::async_read(*socket_, boost::asio::buffer(recv_data_, 4), boost::bind(&client_session::handle_read, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); |