summaryrefslogtreecommitdiffstats
path: root/remoting/jingle_glue/jingle_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/jingle_glue/jingle_client.cc')
-rw-r--r--remoting/jingle_glue/jingle_client.cc7
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);
}