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

Unified Diff: remoting/client/appengine/main.py

Issue 7054029: Add in support for connecting with just the OAuth2 token. Default to OAuth2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Jamie's comments Created 9 years, 7 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
Index: remoting/client/appengine/main.py
diff --git a/remoting/client/appengine/main.py b/remoting/client/appengine/main.py
index 878e71e5f4996210648397e82e96476b8356c6ca..7d4b7b61b772f946eb01313143d8ab3cadb20a45 100644
--- a/remoting/client/appengine/main.py
+++ b/remoting/client/appengine/main.py
@@ -23,7 +23,7 @@ class HostListHandler(webapp.RequestHandler):
def get(self):
template_params = {
'has_oauth2_tokens': auth.HasOAuth2Tokens(),
- 'xmpp_token': auth.GetXmppToken(throws=False)
+ 'clientlogin_token': auth.GetClientLoginToken(throws=False)
}
path = os.path.join(os.path.dirname(__file__), 'hostlist.html')
self.response.out.write(template.render(path, template_params))
@@ -33,13 +33,19 @@ class ChromotingSessionHandler(webapp.RequestHandler):
"""Renders one Chromoting session."""
@login_required
def get(self):
+ token_type = self.request.get('token_type')
+ if token_type == 'clientlogin':
+ talk_token = auth.GetClientLoginToken()
+ else:
+ talk_token = auth.GetOAuth2AccessToken()
+
template_params = {
'hostname': self.request.get('hostname'),
'username': users.get_current_user().email(),
'hostjid': self.request.get('hostjid'),
'connect_method': self.request.get('connect_method'),
'insecure': self.request.get('insecure'),
- 'xmpp_token': auth.GetXmppToken(),
+ 'talk_token': talk_token,
'http_xmpp_proxy': self.request.get('http_xmpp_proxy')
}
path = os.path.join(os.path.dirname(__file__), 'chromoting_session.html')
« no previous file with comments | « remoting/client/appengine/hostlist.html ('k') | remoting/client/appengine/static_files/chromoting_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698