58class http_session final :
public std::enable_shared_from_this<http_session> {
60 explicit http_session(boost::asio::ip::tcp::socket socket,
61 std::shared_ptr<router>
router,
62 std::shared_ptr<ores::security::jwt::jwt_authenticator> authenticator,
64 session_bytes_callback bytes_callback =
nullptr);
69 boost::asio::awaitable<void>
run();
72 inline static std::string_view logger_name =
"ores.http.net.http_session";
76 static auto instance = make_logger(logger_name);
80 boost::asio::awaitable<void> handle_request(
81 boost::beast::http::request<boost::beast::http::string_body> req);
84 const boost::beast::http::request<boost::beast::http::string_body>& req);
86 boost::beast::http::response<boost::beast::http::string_body> convert_response(
89 domain::http_method convert_method(boost::beast::http::verb verb);
93 boost::beast::tcp_stream stream_;
94 boost::beast::flat_buffer buffer_;
95 std::shared_ptr<router> router_;
96 std::shared_ptr<ores::security::jwt::jwt_authenticator> authenticator_;
98 std::string remote_address_;
99 session_bytes_callback bytes_callback_;