aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/http_auth.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-21 11:45:01 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-10 01:57:51 +0000
commit40ab12a773bc71c566485f4738dfeada7493a10a (patch)
tree9ae443fc09c7ed371cee8355d8fd06c372ce43c9 /contrib/epee/include/net/http_auth.h
parentMerge pull request #3019 (diff)
downloadmonero-40ab12a773bc71c566485f4738dfeada7493a10a.tar.xz
epee: remove dependency on common
Diffstat (limited to 'contrib/epee/include/net/http_auth.h')
-rw-r--r--contrib/epee/include/net/http_auth.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/epee/include/net/http_auth.h b/contrib/epee/include/net/http_auth.h
index 841cebc17..71f56b570 100644
--- a/contrib/epee/include/net/http_auth.h
+++ b/contrib/epee/include/net/http_auth.h
@@ -71,8 +71,8 @@ namespace net_utils
std::uint32_t counter;
};
- http_server_auth() : user() {}
- http_server_auth(login credentials);
+ http_server_auth() : user(), rng() {}
+ http_server_auth(login credentials, std::function<void(size_t, uint8_t*)> r);
//! \return Auth response, or `boost::none` iff `request` had valid auth.
boost::optional<http_response_info> get_response(const http_request_info& request)
@@ -81,10 +81,13 @@ namespace net_utils
return do_get_response(request);
return boost::none;
}
+
private:
boost::optional<http_response_info> do_get_response(const http_request_info& request);
boost::optional<session> user;
+
+ std::function<void(size_t, uint8_t*)> rng;
};
//! Implements RFC 2617 digest auth. Digests from RFC 7616 can be added.