Adding HTTP Digest Auth (but not yet enabled)

This commit is contained in:
Lee Clagett 2016-12-08 20:28:28 -05:00
parent 1a286061ff
commit bdc3d7496f
12 changed files with 1165 additions and 7 deletions

View file

@ -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);