mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 01:22:20 -04:00
support authentication in monero-wallet-rpc set_daemon
This commit is contained in:
parent
319b831e65
commit
fb5b2b352a
2 changed files with 10 additions and 2 deletions
|
@ -4426,7 +4426,11 @@ namespace tools
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!m_wallet->set_daemon(req.address, boost::none, req.trusted, std::move(ssl_options)))
|
||||
boost::optional<epee::net_utils::http::login> daemon_login{};
|
||||
if (!req.username.empty() || !req.password.empty())
|
||||
daemon_login.emplace(req.username, req.password);
|
||||
|
||||
if (!m_wallet->set_daemon(req.address, daemon_login, req.trusted, std::move(ssl_options)))
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_NO_DAEMON_CONNECTION;
|
||||
er.message = std::string("Unable to set daemon");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue