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:
parent
495c8ddbb9
commit
081e0b36dc
5 changed files with 17 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.14)
|
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
|
# Header-only interface library — no compilation, just an include path and
|
||||||
# a CMake config package so consumers do:
|
# a CMake config package so consumers do:
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
#include "oatpp/web/server/handler/ErrorHandler.hpp"
|
#include "oatpp/web/server/handler/ErrorHandler.hpp"
|
||||||
#include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp"
|
#include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp"
|
||||||
|
|
||||||
|
namespace oatpp_authkit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Custom error handler that returns JSON error responses.
|
* @brief Custom error handler that returns JSON error responses.
|
||||||
*
|
*
|
||||||
|
|
@ -63,4 +65,6 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace oatpp_authkit
|
||||||
|
|
||||||
#endif // HANDLER_JSON_ERROR_HANDLER_HPP
|
#endif // HANDLER_JSON_ERROR_HANDLER_HPP
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
#include "oatpp/web/server/interceptor/RequestInterceptor.hpp"
|
#include "oatpp/web/server/interceptor/RequestInterceptor.hpp"
|
||||||
#include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp"
|
#include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp"
|
||||||
|
|
||||||
|
namespace oatpp_authkit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Request interceptor that rejects requests exceeding a body size limit.
|
* @brief Request interceptor that rejects requests exceeding a body size limit.
|
||||||
*
|
*
|
||||||
|
|
@ -40,4 +42,6 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace oatpp_authkit
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include "oatpp/web/server/interceptor/ResponseInterceptor.hpp"
|
#include "oatpp/web/server/interceptor/ResponseInterceptor.hpp"
|
||||||
|
|
||||||
|
namespace oatpp_authkit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Response interceptor that adds standard security headers to all responses.
|
* @brief Response interceptor that adds standard security headers to all responses.
|
||||||
*
|
*
|
||||||
|
|
@ -36,4 +38,6 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace oatpp_authkit
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
namespace oatpp_authkit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Per-key token bucket rate limiter.
|
* @brief Per-key token bucket rate limiter.
|
||||||
*
|
*
|
||||||
|
|
@ -82,4 +84,6 @@ private:
|
||||||
std::unordered_map<std::string, Bucket> m_buckets;
|
std::unordered_map<std::string, Bucket> m_buckets;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace oatpp_authkit
|
||||||
|
|
||||||
#endif // UTIL_RATE_LIMITER_HPP
|
#endif // UTIL_RATE_LIMITER_HPP
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue