3#include <xrpl/beast/net/IPAddress.h>
4#include <xrpl/beast/net/IPEndpoint.h>
5#include <xrpl/json/json_value.h>
6#include <xrpl/resource/Consumer.h>
7#include <xrpl/resource/ResourceManager.h>
8#include <xrpl/server/Handoff.h>
9#include <xrpl/server/Port.h>
11#include <boost/asio/ip/network_v4.hpp>
12#include <boost/asio/ip/network_v6.hpp>
13#include <boost/utility/string_view.hpp>
48 resource::Manager& manager,
A version-independent IP address and port combination.
boost::asio::ip::address Address
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string_view forwardedFor(http_request_type const &request)
Role
Indicates the level of administrative permission to grant.
Role requestRole(Role const &required, Port const &port, json::Value const ¶ms, beast::ip::Endpoint const &remoteIp, std::string_view user)
Return the allowed privilege role.
boost::beast::http::request< boost::beast::http::dynamic_body > http_request_type
bool isUnlimited(Role const &role)
ADMIN and IDENTIFIED roles shall have unlimited resources.
bool ipAllowed(beast::ip::Address const &remoteIp, std::vector< boost::asio::ip::network_v4 > const &nets4, std::vector< boost::asio::ip::network_v6 > const &nets6)
True if remoteIp is in any of adminIp.
resource::Consumer requestInboundEndpoint(resource::Manager &manager, beast::ip::Endpoint const &remoteAddress, Role const &role, std::string_view user, std::string_view forwardedFor)