aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/rpc_command_executor.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-11 00:35:25 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-11 00:35:25 +0200
commiteacf2124b6822d088199179b18d4587404408e0f (patch)
tree48982250b525de443794c218d5386df03e728965 /src/daemon/rpc_command_executor.cpp
parentMerge pull request #1686 (diff)
parentAdd server auth to monerod, and client auth to wallet-cli and wallet-rpc (diff)
downloadmonero-eacf2124b6822d088199179b18d4587404408e0f.tar.xz
Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
Diffstat (limited to 'src/daemon/rpc_command_executor.cpp')
-rw-r--r--src/daemon/rpc_command_executor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 5c07c285e..469f83014 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -29,6 +29,7 @@
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#include "string_tools.h"
+#include "common/password.h"
#include "common/scoped_message_writer.h"
#include "daemon/rpc_command_executor.h"
#include "rpc/core_rpc_server_commands_defs.h"
@@ -95,7 +96,7 @@ namespace {
t_rpc_command_executor::t_rpc_command_executor(
uint32_t ip
, uint16_t port
- , const std::string &user_agent
+ , const boost::optional<tools::login>& login
, bool is_rpc
, cryptonote::core_rpc_server* rpc_server
)
@@ -103,7 +104,10 @@ t_rpc_command_executor::t_rpc_command_executor(
{
if (is_rpc)
{
- m_rpc_client = new tools::t_rpc_client(ip, port);
+ boost::optional<epee::net_utils::http::login> http_login{};
+ if (login)
+ http_login.emplace(login->username, login->password.password());
+ m_rpc_client = new tools::t_rpc_client(ip, port, std::move(http_login));
}
else
{