From 081e0b36dc31aa4993cc44c0660aa8c0bdd57389 Mon Sep 17 00:00:00 2001 From: Uwe Schuster Date: Tue, 21 Apr 2026 21:53:21 +0200 Subject: [PATCH] v0.2.1: wrap clean-lift headers in namespace oatpp_authkit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The four clean-lift headers (SecurityHeadersInterceptor, BodySizeLimitInterceptor, JsonErrorHandler, RateLimiter) were copied verbatim in v0.1.0 and left in the global namespace — consumers that adopt the library alongside existing same-named classes (e.g. fewo-webapp during the #417 swap) would hit ODR clashes. Wrap them in the same namespace the v0.2 auth seams use. Patch bump; no API surface change beyond the qualifier. Co-Authored-By: Claude Opus 4.7 (1M context) --- CMakeLists.txt | 2 +- include/oatpp-authkit/handler/JsonErrorHandler.hpp | 4 ++++ .../oatpp-authkit/interceptor/BodySizeLimitInterceptor.hpp | 4 ++++ .../oatpp-authkit/interceptor/SecurityHeadersInterceptor.hpp | 4 ++++ include/oatpp-authkit/util/RateLimiter.hpp | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e26cfb7..a57980a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(oatpp-authkit VERSION 0.2.0 LANGUAGES CXX) +project(oatpp-authkit VERSION 0.2.1 LANGUAGES CXX) # Header-only interface library — no compilation, just an include path and # a CMake config package so consumers do: diff --git a/include/oatpp-authkit/handler/JsonErrorHandler.hpp b/include/oatpp-authkit/handler/JsonErrorHandler.hpp index 04a1f4e..d2ce7f1 100644 --- a/include/oatpp-authkit/handler/JsonErrorHandler.hpp +++ b/include/oatpp-authkit/handler/JsonErrorHandler.hpp @@ -4,6 +4,8 @@ #include "oatpp/web/server/handler/ErrorHandler.hpp" #include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp" +namespace oatpp_authkit { + /** * @brief Custom error handler that returns JSON error responses. * @@ -63,4 +65,6 @@ private: } }; +} // namespace oatpp_authkit + #endif // HANDLER_JSON_ERROR_HANDLER_HPP diff --git a/include/oatpp-authkit/interceptor/BodySizeLimitInterceptor.hpp b/include/oatpp-authkit/interceptor/BodySizeLimitInterceptor.hpp index 47cdd34..9189e76 100644 --- a/include/oatpp-authkit/interceptor/BodySizeLimitInterceptor.hpp +++ b/include/oatpp-authkit/interceptor/BodySizeLimitInterceptor.hpp @@ -4,6 +4,8 @@ #include "oatpp/web/server/interceptor/RequestInterceptor.hpp" #include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp" +namespace oatpp_authkit { + /** * @brief Request interceptor that rejects requests exceeding a body size limit. * @@ -40,4 +42,6 @@ public: } }; +} // namespace oatpp_authkit + #endif diff --git a/include/oatpp-authkit/interceptor/SecurityHeadersInterceptor.hpp b/include/oatpp-authkit/interceptor/SecurityHeadersInterceptor.hpp index ddeb5a5..0e3a4cc 100644 --- a/include/oatpp-authkit/interceptor/SecurityHeadersInterceptor.hpp +++ b/include/oatpp-authkit/interceptor/SecurityHeadersInterceptor.hpp @@ -3,6 +3,8 @@ #include "oatpp/web/server/interceptor/ResponseInterceptor.hpp" +namespace oatpp_authkit { + /** * @brief Response interceptor that adds standard security headers to all responses. * @@ -36,4 +38,6 @@ public: } }; +} // namespace oatpp_authkit + #endif diff --git a/include/oatpp-authkit/util/RateLimiter.hpp b/include/oatpp-authkit/util/RateLimiter.hpp index ace4555..4a8bad4 100644 --- a/include/oatpp-authkit/util/RateLimiter.hpp +++ b/include/oatpp-authkit/util/RateLimiter.hpp @@ -6,6 +6,8 @@ #include #include +namespace oatpp_authkit { + /** * @brief Per-key token bucket rate limiter. * @@ -82,4 +84,6 @@ private: std::unordered_map m_buckets; }; +} // namespace oatpp_authkit + #endif // UTIL_RATE_LIMITER_HPP