summaryrefslogtreecommitdiffstats
path: root/remoting/signaling
diff options
context:
space:
mode:
authorsergeyu <sergeyu@chromium.org>2015-03-02 09:21:30 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-02 17:21:55 +0000
commitd61f007c70ed45fa94b3e67fa0e991d511fd79a0 (patch)
treefc4dee824b6ff5417c4dd44f969db8d0a5e58850 /remoting/signaling
parent4002d936732a6328d78bacd979bfbb908e282ed7 (diff)
downloadchromium_src-d61f007c70ed45fa94b3e67fa0e991d511fd79a0.zip
chromium_src-d61f007c70ed45fa94b3e67fa0e991d511fd79a0.tar.gz
chromium_src-d61f007c70ed45fa94b3e67fa0e991d511fd79a0.tar.bz2
Remove ClientLogin support from remoting host
All hosts should be using OAuth2 now, so ClientLogin support can be removed. BUG=446646,83897 Review URL: https://codereview.chromium.org/959033004 Cr-Commit-Position: refs/heads/master@{#318716}
Diffstat (limited to 'remoting/signaling')
-rw-r--r--remoting/signaling/xmpp_signal_strategy.cc13
-rw-r--r--remoting/signaling/xmpp_signal_strategy.h4
2 files changed, 4 insertions, 13 deletions
diff --git a/remoting/signaling/xmpp_signal_strategy.cc b/remoting/signaling/xmpp_signal_strategy.cc
index 806852e..5ad0c03 100644
--- a/remoting/signaling/xmpp_signal_strategy.cc
+++ b/remoting/signaling/xmpp_signal_strategy.cc
@@ -83,7 +83,7 @@ void XmppSignalStrategy::Connect() {
settings.set_user(login_jid.node());
settings.set_host(login_jid.domain());
settings.set_resource(resource_name_);
- settings.set_token_service(xmpp_server_config_.auth_service);
+ settings.set_token_service("oauth2");
settings.set_auth_token(buzz::AUTH_MECHANISM_GOOGLE_TOKEN,
xmpp_server_config_.auth_token);
@@ -203,12 +203,10 @@ bool XmppSignalStrategy::HandleStanza(const buzz::XmlElement* stanza) {
}
void XmppSignalStrategy::SetAuthInfo(const std::string& username,
- const std::string& auth_token,
- const std::string& auth_service) {
+ const std::string& auth_token) {
DCHECK(CalledOnValidThread());
xmpp_server_config_.username = username;
xmpp_server_config_.auth_token = auth_token;
- xmpp_server_config_.auth_service = auth_service;
}
void XmppSignalStrategy::SetResourceName(const std::string &resource_name) {
@@ -269,13 +267,8 @@ void XmppSignalStrategy::SendKeepAlive() {
buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth(
const buzz::XmppClientSettings& settings) {
buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY);
- std::string mechanism = notifier::kDefaultGaiaAuthMechanism;
- if (settings.token_service() == "oauth2") {
- mechanism = "X-OAUTH2";
- }
-
return new notifier::GaiaTokenPreXmppAuth(
- jid.Str(), settings.auth_token(), settings.token_service(), mechanism);
+ jid.Str(), settings.auth_token(), settings.token_service(), "X-OAUTH2");
}
} // namespace remoting
diff --git a/remoting/signaling/xmpp_signal_strategy.h b/remoting/signaling/xmpp_signal_strategy.h
index 18ae841..2d8268b 100644
--- a/remoting/signaling/xmpp_signal_strategy.h
+++ b/remoting/signaling/xmpp_signal_strategy.h
@@ -50,7 +50,6 @@ class XmppSignalStrategy : public base::NonThreadSafe,
std::string username;
std::string auth_token;
- std::string auth_service;
};
XmppSignalStrategy(
@@ -77,8 +76,7 @@ class XmppSignalStrategy : public base::NonThreadSafe,
// access token is renewed). It is OK to call this even when we are in the
// CONNECTED state. It will be used on the next Connect() call.
void SetAuthInfo(const std::string& username,
- const std::string& auth_token,
- const std::string& auth_service);
+ const std::string& auth_token);
// Use this method to override the default resource name used (optional).
// This will be used on the next Connect() call.