ores.http.api
Table of Contents
2. Summary
ores.http.api is the primary HTTP infrastructure library for ORE Studio. It
provides an asynchronous HTTP/1.1 server built on Boost.Beast and Boost.Asio,
JWT authentication middleware (parsing, validation, and claims extraction),
path-based routing, an OpenAPI endpoint registry, and all domain types for HTTP
request/response and JWT claims. This is the foundation for the REST-API surface
exposed to external clients (web, mobile) alongside the NATS-based internal API.
3. Inputs
- Incoming HTTP requests on the configured TCP port.
- JWT tokens in the
Authorization: Bearerheader for authenticated routes. - Configuration: bind address, port, JWT public key.
4. Outputs
- HTTP responses to clients.
- Parsed JWT claims injected into request context for downstream handlers.
- OpenAPI endpoint registry used to generate
openapi.jsonat runtime.
5. Entry points
include/ores.http.api/net/http_server.hpp— server lifecycle management.include/ores.http.api/net/router.hpp— route registration and dispatch.include/ores.http.api/domain/— HTTP and JWT domain types.include/ores.http.api/openapi/— OpenAPI endpoint registry.include/ores.http.api/messaging/— any NATS protocol schemas for HTTP bridge.
6. Dependencies
- Boost.Beast, Boost.Asio — async HTTP server.
nlohmann/json— JWT claim serialisation.ores.iam.api— JWT claims types aligned with IAM sessions.
7. Build dependencies
What the shared profile cannot know, declared here rather than hand-edited into the generated build file. Each block is spliced into its generated file after the profile's baseline.
8. See also
- ores.http.core — concrete route implementations (IAM, variability, storage, etc.).
- ores.http.server — server entrypoint.
9. Test dependencies
The suites link what the profile cannot know about.
find_package(Boost REQUIRED COMPONENTS json url)
target_link_libraries(${lib_target_name}
PUBLIC
ores.security.lib
ores.telemetry.core.lib
ores.utility.lib
Boost::boost
Boost::json
Boost::url
PRIVATE
OpenSSL::SSL)
target_link_libraries(${tests_target_name}
PRIVATE
${lib_target_name}
ores.testing.lib
Catch2::Catch2
faker-cxx::faker-cxx
ores.openssl_cleanup
Threads::Threads)
