28 const boost::property_tree::ptree &cfg,
36 reactor_.add(authenticator->bus_sub(),
47 boost::property_tree::ptree module_config =
config_.get_child(
"module_config");
49 for (
auto &node : module_config.get_child(
"instances"))
51 boost::property_tree::ptree auth_instance_cfg = node.second;
52 std::string auth_ctx_name = auth_instance_cfg.get_child(
"name").data();
53 std::string config_file = auth_instance_cfg.get_child(
"config_file").data();
54 std::string auth_target_name =
55 auth_instance_cfg.get<std::string>(
"target",
"");
56 std::list<std::string> auth_sources_names;
58 for (
const auto &subnode : auth_instance_cfg)
60 if (subnode.first ==
"auth_source")
61 auth_sources_names.push_back(subnode.second.data());
64 if (!auth_target_name.empty())
65 auth_target_name =
utils_->kernel().config_manager().instance_name() +
66 '.' + auth_target_name;
68 INFO(
"Creating AuthFile instance "
69 << auth_ctx_name <<
". Target door = " << auth_target_name);
72 auth_target_name, config_file,
utils_)));
82 *out << ptr->auth_file_name();
83 *out << ptr->auth_file_content();