7#ifndef CMD__RESPONSE_CREATOR_H
8#define CMD__RESPONSE_CREATOR_H
12#include <boost/shared_ptr.hpp>
13#include <unordered_set>
40 std::unordered_set<std::string> command_accept_list) :
41 http::HttpResponseCreator(), http_auth_config_(http_auth_config),
42 command_accept_list_(command_accept_list) {
78 const std::unordered_set<std::string>& accept);
87 return (http_auth_config_);
94 return (command_accept_list_);
124 std::unordered_set<std::string> command_accept_list_;
http::HttpResponseJsonPtr filterCommand(const http::HttpRequestPtr &request, const data::ConstElementPtr &body, const std::unordered_set< std::string > &accept)
Filter commands.
std::unordered_set< std::string > getCommandAcceptList() const
Fetches the command accept list.
virtual http::HttpResponsePtr createStockHttpResponse(const http::HttpRequestPtr &request, const http::HttpStatusCode &status_code) const
Creates stock HTTP response.
virtual ~CmdResponseCreator()=default
virtual destructor.
CmdResponseCreator(http::HttpAuthConfigPtr http_auth_config, std::unordered_set< std::string > command_accept_list)
Constructor.
static bool EMULATE_AGENT_RESPONSE
The emulate agent response flag.
virtual http::HttpRequestPtr createNewHttpRequest() const
Create a new request.
http::HttpAuthConfigPtr getAuthConfig() const
Fetches the authentication configuration.
Specifies an interface for classes creating HTTP responses from HTTP requests.
boost::shared_ptr< CmdResponseCreator > CmdResponseCreatorPtr
Pointer to the CmdResponseCreator.
boost::shared_ptr< const Element > ConstElementPtr
HttpStatusCode
HTTP status codes (cf RFC 2068).
boost::shared_ptr< HttpAuthConfig > HttpAuthConfigPtr
Type of shared pointers to HTTP authentication configuration.
boost::shared_ptr< HttpResponseJson > HttpResponseJsonPtr
Pointer to the HttpResponseJson object.
boost::shared_ptr< HttpResponse > HttpResponsePtr
Pointer to the HttpResponse object.
boost::shared_ptr< HttpRequest > HttpRequestPtr
Pointer to the HttpRequest object.
Defines the logger used by the top-level component of kea-lfc.