summaryrefslogtreecommitdiffstats
path: root/remoting/jingle_glue
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 05:56:34 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 05:56:34 +0000
commitaee88cf10bc68f7b8c0aa25d9aa86a1fad22bc1f (patch)
tree8630a42ecb327bbf34386e65362a76309fe170aa /remoting/jingle_glue
parentda5f1955339764e021b24ac0e9abfb89e3160ded (diff)
downloadchromium_src-aee88cf10bc68f7b8c0aa25d9aa86a1fad22bc1f.zip
chromium_src-aee88cf10bc68f7b8c0aa25d9aa86a1fad22bc1f.tar.gz
chromium_src-aee88cf10bc68f7b8c0aa25d9aa86a1fad22bc1f.tar.bz2
Reland 137824 - was reverted by mistake
Properly handle accounts that don't have GMail account. 1. Me2MeHostAuthenticatorFactory now verifies that the bare JID of the remote client matches bare JID of the host. Previously it was comparing it with the user's email, which may be different from JID. 2. GaiaOAuthClient now fetches user's email. 3. SignalingConnector verifies that user's email matches the expected value stored in xmpp_login. If it doesn't, then the auth token was generated for a different account and the host treats it as an authentication error. BUG=128102 Review URL: https://chromiumcodereview.appspot.com/10332187 TBR=dharani@chromium.org Review URL: https://chromiumcodereview.appspot.com/10332285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue')
-rw-r--r--remoting/jingle_glue/xmpp_signal_strategy.cc18
1 files changed, 0 insertions, 18 deletions
diff --git a/remoting/jingle_glue/xmpp_signal_strategy.cc b/remoting/jingle_glue/xmpp_signal_strategy.cc
index 6ae4f1a..5cac0fc 100644
--- a/remoting/jingle_glue/xmpp_signal_strategy.cc
+++ b/remoting/jingle_glue/xmpp_signal_strategy.cc
@@ -167,24 +167,6 @@ void XmppSignalStrategy::OnConnectionStateChanged(
DCHECK(CalledOnValidThread());
if (state == buzz::XmppEngine::STATE_OPEN) {
- // Verify that the JID that we've received matches the username
- // that we have. If it doesn't, then the OAuth token was probably
- // issued for a different account, so we treat is a an auth error.
- //
- // TODO(sergeyu): Some user accounts may not have associated
- // e-mail address. The check below will fail for such
- // accounts. Make sure we can handle this case proprely.
- if (!StartsWithASCII(GetLocalJid(), username_, false)) {
- LOG(ERROR) << "Received JID that is different from the expected value.";
- error_ = AUTHENTICATION_FAILED;
- xmpp_client_->SignalStateChange.disconnect(this);
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&DisconnectXmppClient, xmpp_client_));
- xmpp_client_ = NULL;
- SetState(DISCONNECTED);
- return;
- }
-
keep_alive_timer_.Start(
FROM_HERE, base::TimeDelta::FromSeconds(kKeepAliveIntervalSeconds),
this, &XmppSignalStrategy::SendKeepAlive);