From ddfdeca83254db8e3e5c0b2b6c84bd7f73d581d1 Mon Sep 17 00:00:00 2001 From: "simonmorris@chromium.org" Date: Tue, 5 Jun 2012 20:56:16 +0000 Subject: [Chromoting] Use headers, not parameters, to carry the OAuth token when getting a list of hosts. This reverts http://crrev.com/124730. The webkit bug that necessitated that workaround was fixed at http://trac.webkit.org/changeset/110608. BUG=116574 Review URL: https://chromiumcodereview.appspot.com/10532013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140607 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/webapp/host_list.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'remoting') diff --git a/remoting/webapp/host_list.js b/remoting/webapp/host_list.js index 0061068..dd5a546 100644 --- a/remoting/webapp/host_list.js +++ b/remoting/webapp/host_list.js @@ -91,12 +91,10 @@ remoting.HostList.prototype.refresh = function(onDone) { /** @param {string?} token The OAuth2 token. */ var getHosts = function(token) { if (token) { - // TODO(simonmorris): Pass the access token in a header, not a URL - // parameter, when crbug.com/116574 has a better fix. - var params = { 'access_token': token }; + var headers = { 'Authorization': 'OAuth ' + token }; remoting.xhr.get( 'https://www.googleapis.com/chromoting/v1/@me/hosts', - parseHostListResponse, params); + parseHostListResponse, '', headers); } else { that.lastError_ = remoting.Error.AUTHENTICATION_FAILED; onDone(false); -- cgit v1.1