diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:01:08 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:01:08 +0000 |
commit | 722d8eab5034806b347a17cd5c6a10a98feb35f9 (patch) | |
tree | 5f9ae56c70ae1a815a519e1f6de652560138da55 /remoting/jingle_glue/jingle_test_client.cc | |
parent | c551e2fcd56d5c05305414d6384aa74a359e22df (diff) | |
download | chromium_src-722d8eab5034806b347a17cd5c6a10a98feb35f9.zip chromium_src-722d8eab5034806b347a17cd5c6a10a98feb35f9.tar.gz chromium_src-722d8eab5034806b347a17cd5c6a10a98feb35f9.tar.bz2 |
Token-based authentication for chromoting.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2749004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49298 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/jingle_test_client.cc')
-rw-r--r-- | remoting/jingle_glue/jingle_test_client.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/remoting/jingle_glue/jingle_test_client.cc b/remoting/jingle_glue/jingle_test_client.cc index 38677fe..7bf33c0 100644 --- a/remoting/jingle_glue/jingle_test_client.cc +++ b/remoting/jingle_glue/jingle_test_client.cc @@ -15,11 +15,13 @@ extern "C" { #include "base/at_exit.h" #include "media/base/data_buffer.h" +#include "remoting/base/constants.h" #include "remoting/jingle_glue/jingle_channel.h" #include "remoting/jingle_glue/jingle_client.h" using remoting::JingleClient; using remoting::JingleChannel; +using remoting::kChromotingTokenServiceName; void SetConsoleEcho(bool on) { #if defined(OS_WIN) @@ -51,10 +53,10 @@ class JingleTestClient : public JingleChannel::Callback, public: virtual ~JingleTestClient() {} - void Run(const std::string& username, const std::string& password, + void Run(const std::string& username, const std::string& auth_token, const std::string& host_jid) { client_ = new JingleClient(); - client_->Init(username, password, this); + client_->Init(username, auth_token, kChromotingTokenServiceName, this); if (host_jid != "") { scoped_refptr<JingleChannel> channel = client_->Connect(host_jid, this); @@ -144,16 +146,13 @@ int main(int argc, char** argv) { std::cout << "JID: "; std::cin >> username; - std::string password; - SetConsoleEcho(false); - std::cout << "Password: "; - std::cin >> password; - SetConsoleEcho(true); - std::cout << std::endl; + std::string auth_token; + std::cout << "Auth token: "; + std::cin >> auth_token; JingleTestClient client; - client.Run(username, password, host_jid); + client.Run(username, auth_token, host_jid); return 0; } |