Page MenuHomePhabricator

D6251.id.diff
No OneTemporary

D6251.id.diff

diff --git a/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.h b/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.h
--- a/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.h
+++ b/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.h
@@ -26,10 +26,12 @@
static const std::string OPTION_NOTIFS_APNS_P12_CERT_PASSWORD;
static const std::string OPTION_NOTIFS_APNS_TOPIC;
static const std::string OPTION_NOTIFS_FCM_SERVER_KEY;
+ static const std::string OPTION_SESSIONS_SKIP_AUTH_KEY;
static ConfigManager &getInstance();
void load();
std::string getParameter(std::string param);
+ bool isParameterSet(std::string param);
};
} // namespace config
diff --git a/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.cpp b/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.cpp
--- a/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.cpp
+++ b/services/tunnelbroker/src/libcpp/src/Tools/ConfigManager.cpp
@@ -31,6 +31,8 @@
"notifications.apns_topic";
const std::string ConfigManager::OPTION_NOTIFS_FCM_SERVER_KEY =
"notifications.fcm_server_key";
+const std::string ConfigManager::OPTION_SESSIONS_SKIP_AUTH_KEY =
+ "sessions.skip_authentication";
ConfigManager &ConfigManager::getInstance() {
static ConfigManager instance;
@@ -113,6 +115,10 @@
boost::program_options::value<std::string>()->required(),
"Firebase Cloud Messaging server key for Android notifications");
+ description.add_options()(
+ this->OPTION_SESSIONS_SKIP_AUTH_KEY.c_str(),
+ "Skip sessions authentication mechanism");
+
boost::program_options::parsed_options parsedDescription =
boost::program_options::parse_config_file(
fileStream, description, true);
@@ -141,6 +147,10 @@
return parameterValue;
}
+bool ConfigManager::isParameterSet(std::string param) {
+ return this->variablesMap.count(param) != 0;
+}
+
} // namespace config
} // namespace network
} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 18, 7:54 PM (8 h, 35 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2674587
Default Alt Text
D6251.id.diff (1 KB)

Event Timeline