| Index: remoting/client/plugin/chromoting_scriptable_object.cc
|
| diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
|
| index 89c87937c13c8ac517af37a10bf53ad591472ece..fe5d2838e81939593ac1cacf91408d075b69232d 100644
|
| --- a/remoting/client/plugin/chromoting_scriptable_object.cc
|
| +++ b/remoting/client/plugin/chromoting_scriptable_object.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/logging.h"
|
| #include "base/stringprintf.h"
|
| #include "ppapi/cpp/var.h"
|
| +#include "remoting/base/auth_token_util.h"
|
| #include "remoting/client/client_config.h"
|
| #include "remoting/client/chromoting_stats.h"
|
| #include "remoting/client/plugin/chromoting_instance.h"
|
| @@ -377,7 +378,7 @@ Var ChromotingScriptableObject::DoConnectUnsandboxed(
|
| // Parameter order is:
|
| // host_jid
|
| // username
|
| - // xmpp_token
|
| + // auth_token
|
| // access_code (optional)
|
| unsigned int arg = 0;
|
| if (!args[arg].is_string()) {
|
| @@ -393,10 +394,15 @@ Var ChromotingScriptableObject::DoConnectUnsandboxed(
|
| std::string username = args[arg++].AsString();
|
|
|
| if (!args[arg].is_string()) {
|
| - *exception = Var("The auth_token must be a string.");
|
| + *exception = Var("The auth_token_with_service must be a string.");
|
| return Var();
|
| }
|
| - std::string auth_token = args[arg++].AsString();
|
| + std::string auth_token_with_service = args[arg++].AsString();
|
| +
|
| + std::string auth_service;
|
| + std::string auth_token;
|
| + ParseAuthTokenWithService(auth_token_with_service, &auth_token,
|
| + &auth_service);
|
|
|
| std::string access_code;
|
| if (args.size() > arg) {
|
| @@ -417,8 +423,10 @@ Var ChromotingScriptableObject::DoConnectUnsandboxed(
|
| config.host_jid = host_jid;
|
| config.username = username;
|
| config.auth_token = auth_token;
|
| + config.auth_service = auth_service;
|
| config.nonce = access_code;
|
| VLOG(1) << "host_jid: " << host_jid << ", username: " << username
|
| + << ", auth_service: " << auth_service
|
| << ", access_code: " << access_code;
|
| instance_->Connect(config);
|
|
|
|
|