diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:09:11 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:09:11 +0000 |
commit | 6f5ec4a51a4cfc6023c094801f2f180c6739a89b (patch) | |
tree | 256f64b843183e4c1c0b525ac84b84797e038848 /remoting/client | |
parent | c78559eabd562359ef23585df9268eeb5119b718 (diff) | |
download | chromium_src-6f5ec4a51a4cfc6023c094801f2f180c6739a89b.zip chromium_src-6f5ec4a51a4cfc6023c094801f2f180c6739a89b.tar.gz chromium_src-6f5ec4a51a4cfc6023c094801f2f180c6739a89b.tar.bz2 |
Revert 49298 - Broke compile - Token-based authentication for chromoting.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2749004
TBR=sergeyu@chromium.org
Review URL: http://codereview.chromium.org/2724010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r-- | remoting/client/host_connection.cc | 6 | ||||
-rw-r--r-- | remoting/client/host_connection.h | 2 | ||||
-rw-r--r-- | remoting/client/simple_client.cc | 13 |
3 files changed, 11 insertions, 10 deletions
diff --git a/remoting/client/host_connection.cc b/remoting/client/host_connection.cc index 00c542e..f858af6 100644 --- a/remoting/client/host_connection.cc +++ b/remoting/client/host_connection.cc @@ -4,8 +4,6 @@ #include "remoting/client/host_connection.h" -#include "remoting/base/constants.h" - namespace remoting { HostConnection::HostConnection(ProtocolDecoder* decoder, @@ -18,10 +16,10 @@ HostConnection::~HostConnection() { } void HostConnection::Connect(const std::string& username, - const std::string& auth_token, + const std::string& password, const std::string& host_jid) { jingle_client_ = new JingleClient(); - jingle_client_->Init(username, auth_token, kChromotingTokenServiceName, this); + jingle_client_->Init(username, password, this); jingle_channel_ = jingle_client_->Connect(host_jid, this); } diff --git a/remoting/client/host_connection.h b/remoting/client/host_connection.h index 8cd2a76..af1fda7 100644 --- a/remoting/client/host_connection.h +++ b/remoting/client/host_connection.h @@ -47,7 +47,7 @@ class HostConnection : public JingleChannel::Callback, virtual ~HostConnection(); - void Connect(const std::string& username, const std::string& auth_token, + void Connect(const std::string& username, const std::string& password, const std::string& host_jid); void Disconnect(); diff --git a/remoting/client/simple_client.cc b/remoting/client/simple_client.cc index da65b2a..ff74312 100644 --- a/remoting/client/simple_client.cc +++ b/remoting/client/simple_client.cc @@ -176,16 +176,19 @@ int main(int argc, char** argv) { return 1; } - // Get auth token. - std::string auth_token; - std::cout << "Auth Token: "; - getline(std::cin, auth_token); + // Get password (with console echo turned off). + std::string password; + SetConsoleEcho(false); + std::cout << "Password: "; + getline(std::cin, password); + SetConsoleEcho(true); + std::cout << std::endl; // The message loop that everything runs on. MessageLoop main_loop; SimpleHostEventHandler handler(&main_loop); HostConnection connection(new ProtocolDecoder(), &handler); - connection.Connect(username, auth_token, host_jid); + connection.Connect(username, password, host_jid); // Run the message. main_loop.Run(); |