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()->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