added failure event
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-09-16 11:17:59 -05:00
parent 59e2986080
commit 26714a836c

View File

@ -70,7 +70,12 @@ auto server::check_authorization(const httplib::Request &req) -> bool {
auth.erase(auth.begin()); auth.erase(auth.begin());
auto pwd = utils::string::join(auth, ':'); auto pwd = utils::string::join(auth, ':');
return (user == config_.get_api_user()) && (pwd == config_.get_api_auth()); if ((user != config_.get_api_user()) || (pwd != config_.get_api_auth())) {
utils::error::raise_error(function_name, "Authorization failed");
return false;
}
return true;
} }
void server::handle_get_config(const httplib::Request & /*req*/, void server::handle_get_config(const httplib::Request & /*req*/,