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

Unified Diff: remoting/webapp/crd/js/client_session.js

Issue 1015343002: Downscope tokens before sending them to app-remoting host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/webapp/crd/js/identity.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_session.js
diff --git a/remoting/webapp/crd/js/client_session.js b/remoting/webapp/crd/js/client_session.js
index a77be6934f6ad28c156d6c4f50d9aa5071c593c9..c6ee618afbdc2bf64f0b9148d9ed413adfc26c44 100644
--- a/remoting/webapp/crd/js/client_session.js
+++ b/remoting/webapp/crd/js/client_session.js
@@ -606,7 +606,11 @@ remoting.ClientSession.prototype.sendGoogleDriveAccessToken_ = function() {
var sendError = function(error) {
console.log('Failed to refresh access token: ' + error.toString());
};
- remoting.identity.getNewToken().
+ var googleDriveScopes = [
+ 'https://docs.google.com/feeds/',
+ 'https://www.googleapis.com/auth/drive'
+ ];
+ remoting.identity.getNewToken(googleDriveScopes).
then(sendToken).
catch(remoting.Error.handler(sendError));
window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this),
« no previous file with comments | « no previous file | remoting/webapp/crd/js/identity.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698