diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 20:11:22 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 20:11:22 +0000 |
commit | fc9bc05353e26d7d169402aeb4d4f248403cb420 (patch) | |
tree | 3170b0aa9c0601703e4ac09e5ae71b9be98a4868 /remoting/jingle_glue | |
parent | 3fa29ca5ebc800d5eb187ace26dedd996485a39a (diff) | |
download | chromium_src-fc9bc05353e26d7d169402aeb4d4f248403cb420.zip chromium_src-fc9bc05353e26d7d169402aeb4d4f248403cb420.tar.gz chromium_src-fc9bc05353e26d7d169402aeb4d4f248403cb420.tar.bz2 |
Wire in OAuth2 support into non-sandboxed connections in libjingle.
BUG=none
TEST=can connect w/o ClientLogin token.
Review URL: http://codereview.chromium.org/7008003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue')
-rw-r--r-- | remoting/jingle_glue/jingle_client.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc index ce11780..509e6f8 100644 --- a/remoting/jingle_glue/jingle_client.cc +++ b/remoting/jingle_glue/jingle_client.cc @@ -114,11 +114,16 @@ void XmppSignalStrategy::OnConnectionStateChanged( buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth( const buzz::XmppClientSettings& settings) { buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY); + std::string mechanism = notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism; + if (settings.token_service() == "oauth2") { + mechanism = "X-OAUTH2"; + } + return new notifier::GaiaTokenPreXmppAuth( jid.Str(), settings.auth_cookie(), settings.token_service(), - notifier::GaiaTokenPreXmppAuth::kDefaultAuthMechanism); + mechanism); } |