Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1337)

Side by Side Diff: remoting/webapp/me2mom/oauth2.js

Issue 7739040: Use talk gadget blank page for bounce. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/me2mom/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * OAuth2 class that handles retrieval/storage of an OAuth2 token. 7 * OAuth2 class that handles retrieval/storage of an OAuth2 token.
8 * 8 *
9 * Uses a content script to trampoline the OAuth redirect page back into the 9 * Uses a content script to trampoline the OAuth redirect page back into the
10 * extension context. This works around the lack of native support for 10 * extension context. This works around the lack of native support for
(...skipping 16 matching lines...) Expand all
27 // Constants for parameters used in retrieving the OAuth2 credentials. 27 // Constants for parameters used in retrieving the OAuth2 credentials.
28 remoting.OAuth2.prototype.CLIENT_ID_ = 28 remoting.OAuth2.prototype.CLIENT_ID_ =
29 '440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' + 29 '440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' +
30 'apps.googleusercontent.com'; 30 'apps.googleusercontent.com';
31 remoting.OAuth2.prototype.CLIENT_SECRET_ = 'W2ieEsG-R1gIA4MMurGrgMc_'; 31 remoting.OAuth2.prototype.CLIENT_SECRET_ = 'W2ieEsG-R1gIA4MMurGrgMc_';
32 remoting.OAuth2.prototype.SCOPE_ = 32 remoting.OAuth2.prototype.SCOPE_ =
33 'https://www.googleapis.com/auth/chromoting ' + 33 'https://www.googleapis.com/auth/chromoting ' +
34 'https://www.googleapis.com/auth/googletalk ' + 34 'https://www.googleapis.com/auth/googletalk ' +
35 'https://www.googleapis.com/auth/userinfo#email'; 35 'https://www.googleapis.com/auth/userinfo#email';
36 remoting.OAuth2.prototype.REDIRECT_URI_ = 36 remoting.OAuth2.prototype.REDIRECT_URI_ =
37 'https://chromoting-httpxmpp-oauth2-dev.corp.google.com' + 37 'https://talkgadget.google.com/talkgadget/blank';
38 '/oauth2_trampoline';
39 remoting.OAuth2.prototype.OAUTH2_TOKEN_ENDPOINT_ = 38 remoting.OAuth2.prototype.OAUTH2_TOKEN_ENDPOINT_ =
40 'https://accounts.google.com/o/oauth2/token'; 39 'https://accounts.google.com/o/oauth2/token';
41 40
42 /** @return {boolean} */ 41 /** @return {boolean} */
43 remoting.OAuth2.prototype.isAuthenticated = function() { 42 remoting.OAuth2.prototype.isAuthenticated = function() {
44 if (this.getRefreshToken()) { 43 if (this.getRefreshToken()) {
45 return true; 44 return true;
46 } 45 }
47 return false; 46 return false;
48 } 47 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 throw "Unable to get access token."; 261 throw "Unable to get access token.";
263 } 262 }
264 myfunc(that.getAccessToken()); 263 myfunc(that.getAccessToken());
265 }); 264 });
266 return; 265 return;
267 } 266 }
268 267
269 myfunc(this.getAccessToken()); 268 myfunc(this.getAccessToken());
270 } 269 }
271 }()); 270 }());
OLDNEW
« no previous file with comments | « remoting/webapp/me2mom/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698