aboutsummaryrefslogtreecommitdiff
path: root/src/common/rpc_client.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2017-02-05 17:48:03 -0500
committerLee Clagett <code@leeclagett.com>2017-02-06 01:15:41 -0500
commitce7fcbb4aea884bb4bf433cf419ffa267f859c87 (patch)
treee8fb644b62006d78f801d739fbebad50f2c2409d /src/common/rpc_client.h
parentMerge pull request #1669 (diff)
downloadmonero-ce7fcbb4aea884bb4bf433cf419ffa267f859c87.tar.xz
Add server auth to monerod, and client auth to wallet-cli and wallet-rpc
Diffstat (limited to 'src/common/rpc_client.h')
-rw-r--r--src/common/rpc_client.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/rpc_client.h b/src/common/rpc_client.h
index f5ecc8b50..40c103bf3 100644
--- a/src/common/rpc_client.h
+++ b/src/common/rpc_client.h
@@ -28,10 +28,13 @@
#pragma once
+#include <boost/optional/optional.hpp>
+
#include "common/http_connection.h"
#include "common/scoped_message_writer.h"
#include "rpc/core_rpc_server_commands_defs.h"
#include "storages/http_abstract_invoke.h"
+#include "net/http_auth.h"
#include "net/http_client.h"
#include "string_tools.h"
@@ -45,11 +48,12 @@ namespace tools
t_rpc_client(
uint32_t ip
, uint16_t port
+ , boost::optional<epee::net_utils::http::login> user
)
: m_http_client{}
{
m_http_client.set_server(
- epee::string_tools::get_ip_string_from_int32(ip), std::to_string(port)
+ epee::string_tools::get_ip_string_from_int32(ip), std::to_string(port), std::move(user)
);
}