7 #ifndef HTTP_BASIC_AUTH_CONFIG_H 8 #define HTTP_BASIC_AUTH_CONFIG_H 13 #include <unordered_map> 36 const std::string& password,
49 const std::string& user_file,
50 const std::string& password,
51 const std::string& password_file,
52 bool password_file_only,
80 return (password_file_);
87 return (password_file_only_);
101 std::string user_file_;
104 std::string password_;
107 std::string password_file_;
110 bool password_file_only_;
132 void add(
const std::string& user,
133 const std::string& user_file,
134 const std::string& password,
135 const std::string& password_file,
136 bool password_file_only =
false,
143 virtual bool empty()
const;
146 virtual void clear();
152 std::string getFileContent(
const std::string& file_name)
const;
192 BasicHttpAuthClientList list_;
195 BasicHttpAuthMap map_;
204 #endif // endif HTTP_BASIC_AUTH_CONFIG_H const std::string & getUserFile() const
Returns the user id file.
const std::string & getUser() const
Returns the user id.
Basic HTTP authentication configuration.
const std::string & getPassword() const
Returns the password.
boost::shared_ptr< HttpResponseJson > HttpResponseJsonPtr
Pointer to the HttpResponseJson object.
Base class for user context.
virtual isc::data::ElementPtr toElement() const
Unparses basic HTTP authentication client configuration.
Specifies an interface for classes creating HTTP responses from HTTP requests.
boost::shared_ptr< Element > ElementPtr
Base type of HTTP authentication configuration.
std::unordered_map< std::string, std::string > BasicHttpAuthMap
Type of basic HTTP authentication credential and user id map, e.g.
BasicHttpAuthClient(const std::string &user, const std::string &password, const isc::data::ConstElementPtr &user_context)
Constructor (legacy).
bool getPasswordFileOnly() const
Returns the password file only flag.
const BasicHttpAuthClientList & getClientList() const
Returns the list of client configuration.
Abstract class for configuration Cfg_* classes.
boost::shared_ptr< const Element > ConstElementPtr
const std::string & getPasswordFile() const
Returns the password file.
Defines the logger used by the top-level component of kea-lfc.
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.
const BasicHttpAuthMap & getCredentialMap() const
Returns the credential and user id map.
boost::shared_ptr< HttpRequest > HttpRequestPtr
Pointer to the HttpRequest object.
Basic HTTP authentication client configuration.