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

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: 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
« no previous file with comments | « no previous file | remoting/client/appengine/auth.py » ('j') | no next file with comments »
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..959aaab9e969787cdc30b802c67c02e116d0fd3a 100644
--- a/remoting/client/appengine/api.py
+++ b/remoting/client/appengine/api.py
@@ -17,19 +17,6 @@ from google.appengine.ext.webapp.util import login_required
import auth
-class GetXmppTokenHandler(webapp.RequestHandler):
- """Retrieves the user's XMPP 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}))
- except auth.NotAuthenticated:
- self.response.out.write('User has not authenticated')
- self.set_status(400)
-
-
class GetHostListHandler(webapp.RequestHandler):
"""Proxies the host-list handlers on the Chromoting directory."""
@login_required
@@ -43,7 +30,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 +40,6 @@ class GetHostListHandler(webapp.RequestHandler):
def main():
application = webapp.WSGIApplication(
[
- ('/api/get_xmpp_token', GetXmppTokenHandler),
('/api/get_host_list', GetHostListHandler)
],
debug=True)
« no previous file with comments | « no previous file | remoting/client/appengine/auth.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698