v0.2.1: wrap clean-lift headers in namespace oatpp_authkit

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) <noreply@anthropic.com>
This commit is contained in:
Uwe Schuster 2026-04-21 21:53:21 +02:00
parent 495c8ddbb9
commit 081e0b36dc
5 changed files with 17 additions and 1 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -6,6 +6,8 @@
#include <string>
#include <unordered_map>
namespace oatpp_authkit {
/**
* @brief Per-key token bucket rate limiter.
*
@ -82,4 +84,6 @@ private:
std::unordered_map<std::string, Bucket> m_buckets;
};
} // namespace oatpp_authkit
#endif // UTIL_RATE_LIMITER_HPP