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

Unified Diff: appengine/isolate/ui/res/imp/index/isolate-index-demo.html

Issue 2991303002: Add in OAuth authentication to Isolate Polymer UI (Closed)
Patch Set: Fix GET request for server_details Created 3 years, 4 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 | « appengine/isolate/ui/res/imp/index/isolate-index.html ('k') | appengine/isolate/ui/res/imp/shared » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/isolate/ui/res/imp/index/isolate-index-demo.html
diff --git a/appengine/isolate/ui/res/imp/index/isolate-index-demo.html b/appengine/isolate/ui/res/imp/index/isolate-index-demo.html
index 6c01e91cf0831eaecca3cfa5209cb472f65759c1..09c04b0da080df77f8a320790d7a788b906e5d72 100644
--- a/appengine/isolate/ui/res/imp/index/isolate-index-demo.html
+++ b/appengine/isolate/ui/res/imp/index/isolate-index-demo.html
@@ -23,6 +23,23 @@
server.autoRespondAfter = 1200;
server.autoRespond = true;
+ var details = {
+ server_version: "1234-deadbeef",
+ bot_version: "abcdoeraymeyouandme",
+ };
+
+ var respond = function(request){
+ if (!request.requestHeaders.authorization) {
+ sinon.log("You must be logged in (check your Oauth?)");
+ request.respond(403, {}, "You must be logged in (check your Oauth?)");
+ return;
+ }
+ sinon.log("User authenticated :) "+ request.requestHeaders.authorization);
+ request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(details));
+ }
+
+ server.respondWith("GET", /^\/_ah\/api\/isolateservice\/v1\/server_details/, respond);
+
</script>
<link rel="import" href="/res/imp/bower_components/polymer/polymer.html">
« no previous file with comments | « appengine/isolate/ui/res/imp/index/isolate-index.html ('k') | appengine/isolate/ui/res/imp/shared » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698