7 #ifndef HTTP_BASIC_AUTH_CONFIG_H
8 #define HTTP_BASIC_AUTH_CONFIG_H
13 #include <unordered_map>
36 const std::string& password,
60 std::string password_;
79 void add(
const std::string& user,
80 const std::string& password,
86 virtual bool empty()
const;
129 BasicHttpAuthClientList list_;
132 BasicHttpAuthMap map_;
141 #endif // endif HTTP_BASIC_AUTH_CONFIG_H
void parse(const isc::data::ConstElementPtr &config)
Parses basic HTTP authentication configuration.
Basic HTTP authentication configuration.
boost::shared_ptr< HttpResponseJson > HttpResponseJsonPtr
Pointer to the HttpResponseJson object.
Base class for user context.
Specifies an interface for classes creating HTTP responses from HTTP requests.
boost::shared_ptr< Element > ElementPtr
Base type of HTTP authentication configuration.
virtual bool empty() const
Empty predicate.
std::unordered_map< std::string, std::string > BasicHttpAuthMap
Type of basic HTTP authentication credential and user id map, e.g.
virtual isc::http::HttpResponseJsonPtr checkAuth(const isc::http::HttpResponseCreator &creator, const isc::http::HttpRequestPtr &request) const
Validate HTTP request.
const BasicHttpAuthMap & getCredentialMap() const
Returns the credential and user id map.
BasicHttpAuthClient(const std::string &user, const std::string &password, const isc::data::ConstElementPtr &user_context)
Constructor.
Abstract class for configuration Cfg_* classes.
virtual isc::data::ElementPtr toElement() const
Unparses basic HTTP authentication configuration.
const std::string & getPassword() const
Returns the password.
virtual void clear()
Clear configuration.
boost::shared_ptr< const Element > ConstElementPtr
virtual isc::data::ElementPtr toElement() const
Unparses basic HTTP authentication client configuration.
Defines the logger used by the top-level component of kea-dhcp-ddns.
const std::string & getUser() const
Returns the user id.
virtual ~BasicHttpAuthConfig()
Destructor.
std::list< BasicHttpAuthClient > BasicHttpAuthClientList
Type of basic HTTP authentication client configuration list.
boost::shared_ptr< BasicHttpAuthConfig > BasicHttpAuthConfigPtr
Type of shared pointers to basic HTTP authentication configuration.
void add(const std::string &user, const std::string &password, const isc::data::ConstElementPtr &user_context=isc::data::ConstElementPtr())
Add a client configuration.
boost::shared_ptr< HttpRequest > HttpRequestPtr
Pointer to the HttpRequest object.
const BasicHttpAuthClientList & getClientList() const
Returns the list of client configuration.
Basic HTTP authentication client configuration.