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

Unified Diff: remoting/client/appengine/api.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: 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
« no previous file with comments | « no previous file | remoting/client/appengine/auth.py » ('j') | remoting/client/appengine/hostlist.html » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/appengine/api.py
diff --git a/remoting/client/appengine/api.py b/remoting/client/appengine/api.py
index e1e2ddb758e8908df177961814a9575794632065..f6b16c685f2a354185f16414f243c2088a5b12b0 100644
--- a/remoting/client/appengine/api.py
+++ b/remoting/client/appengine/api.py
@@ -17,14 +17,14 @@ from google.appengine.ext.webapp.util import login_required
import auth
-class GetXmppTokenHandler(webapp.RequestHandler):
- """Retrieves the user's XMPP token."""
+class GetClientLoginTokenHandler(webapp.RequestHandler):
+ """Retrieves the user's ClientLogin token."""
@login_required
def get(self):
try:
self.response.headers['Content-Type'] = 'application/json'
self.response.out.write(
- json.dumps({'xmpp_token': auth.GetXmppToken().token}))
+ json.dumps({'xmpp_token': auth.GetClientLoginToken().token}))
Jamie 2011/05/23 19:24:12 Does the name of the token also need to change fro
awong 2011/05/23 20:43:23 Apparently no one even calls this. I've just remov
except auth.NotAuthenticated:
self.response.out.write('User has not authenticated')
self.set_status(400)
@@ -43,7 +43,7 @@ class GetHostListHandler(webapp.RequestHandler):
result = urlfetch.fetch(
url = 'https://www.googleapis.com/chromoting/v1/@me/hosts',
method = urlfetch.GET,
- headers = {'Authorization': 'OAuth ' + auth.GetAccessToken()})
+ headers = {'Authorization': 'OAuth ' + auth.GetOAuth2AccessToken()})
self.response.set_status(result.status_code)
for i in result.headers:
self.response.headers[i] = result.headers[i]
@@ -53,7 +53,7 @@ class GetHostListHandler(webapp.RequestHandler):
def main():
application = webapp.WSGIApplication(
[
- ('/api/get_xmpp_token', GetXmppTokenHandler),
+ ('/api/get_clientlogin_token', GetClientLoginTokenHandler),
('/api/get_host_list', GetHostListHandler)
],
debug=True)
« no previous file with comments | « no previous file | remoting/client/appengine/auth.py » ('j') | remoting/client/appengine/hostlist.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698