Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3485301
D6251.id20872.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6251.id20872.diff
View Options
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,13 @@
return parameterValue;
}
+bool ConfigManager::isParameterSet(std::string param) {
+ if (this->variablesMap.count(param)) {
+ return true;
+ }
+ return false;
+}
+
} // namespace config
} // namespace network
} // namespace comm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 7:54 PM (7 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2674592
Default Alt Text
D6251.id20872.diff (1 KB)
Attached To
Mode
D6251: [services] Tunnelbroker - Add skip authentication config parameter
Attached
Detach File
Event Timeline
Log In to Comment