19 BasicHttpAuth::BasicHttpAuth(
const std::string& user,
20 const std::string& password)
21 : user_(user), password_(password) {
22 if (user.find(
':') != string::npos) {
30 if (secret.find(
':') == string::npos) {
36 void BasicHttpAuth::buildSecret() {
37 secret_ = user_ +
":" + password_;
40 void BasicHttpAuth::buildCredential() {
std::vector< uint8_t > encodeUtf8(const std::string &value)
Encode value string into UTF-8.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::string encodeBase64(const std::vector< uint8_t > &binary)
Encode binary data in the base64 format.
BasicHttpAuth(const std::string &user, const std::string &password)
Constructor.