aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/http_server_impl_base.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2016-12-08 20:28:28 -0500
committerLee Clagett <code@leeclagett.com>2016-12-13 00:19:54 -0500
commitbdc3d7496f0ba6ca8a8a5992a33ab617fec8058b (patch)
treee9122ee2e7fcf0898d4d1538d51a54c08fb3add7 /contrib/epee/include/net/http_server_impl_base.h
parentMerge pull request #1436 (diff)
downloadmonero-bdc3d7496f0ba6ca8a8a5992a33ab617fec8058b.tar.xz
Adding HTTP Digest Auth (but not yet enabled)
Diffstat (limited to 'contrib/epee/include/net/http_server_impl_base.h')
-rw-r--r--contrib/epee/include/net/http_server_impl_base.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/epee/include/net/http_server_impl_base.h b/contrib/epee/include/net/http_server_impl_base.h
index 65fe5eed6..f6b2d6941 100644
--- a/contrib/epee/include/net/http_server_impl_base.h
+++ b/contrib/epee/include/net/http_server_impl_base.h
@@ -52,7 +52,8 @@ namespace epee
: m_net_server(external_io_service)
{}
- bool init(const std::string& bind_port = "0", const std::string& bind_ip = "0.0.0.0", const std::string &user_agent = "")
+ bool init(const std::string& bind_port = "0", const std::string& bind_ip = "0.0.0.0",
+ std::string user_agent = "", boost::optional<net_utils::http::http_auth::login> user = boost::none)
{
//set self as callback handler
@@ -62,7 +63,8 @@ namespace epee
m_net_server.get_config_object().m_folder = "";
// workaround till we get auth/encryption
- m_net_server.get_config_object().m_required_user_agent = user_agent;
+ m_net_server.get_config_object().m_required_user_agent = std::move(user_agent);
+ m_net_server.get_config_object().m_user = std::move(user);
LOG_PRINT_L0("Binding on " << bind_ip << ":" << bind_port);
bool res = m_net_server.init_server(bind_port, bind_ip);