summaryrefslogtreecommitdiffstats
path: root/remoting/client/client_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/client/client_util.cc')
-rw-r--r--remoting/client/client_util.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/remoting/client/client_util.cc b/remoting/client/client_util.cc
index 1f1d16a..4ccdd3d 100644
--- a/remoting/client/client_util.cc
+++ b/remoting/client/client_util.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/string_util.h"
+#include "remoting/base/constants.h"
#include "remoting/client/client_config.h"
using std::string;
@@ -24,6 +25,7 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
string host_jid;
string username;
string auth_token;
+ string auth_service(kChromotingTokenDefaultServiceName);
for (int i = 1; i < argc; i++) {
std::string arg = argv[i];
@@ -48,6 +50,12 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
found_auth_token = true;
auth_token = argv[i];
}
+ } else if (arg == "--service") {
+ if (++i >= argc) {
+ LOG(WARNING) << "Expected service name to follow --service option";
+ } else {
+ auth_service = argv[i];
+ }
} else {
LOG(WARNING) << "Unrecognized option: " << arg;
}
@@ -66,6 +74,7 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
config->host_jid = host_jid;
config->username = username;
config->auth_token = auth_token;
+ config->auth_service = auth_service;
return true;
}