Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(667)

Unified Diff: misc/dashboard/godashboard/auth.py

Issue 4627081: code review 4627081: dashboard: show build state and package comments on das... (Closed)
Patch Set: diff -r 13ec466f6670 https://go.googlecode.com/hg/ Created 13 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « misc/dashboard/builder/package.go ('k') | misc/dashboard/godashboard/gobuild.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: misc/dashboard/godashboard/auth.py
===================================================================
new file mode 100644
--- /dev/null
+++ b/misc/dashboard/godashboard/auth.py
@@ -0,0 +1,13 @@
+# Copyright 2011 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+import hmac
+
+# local imports
+import key
+
+def auth(req):
+ k = req.get('key')
+ return k == hmac.new(key.accessKey, req.get('builder')).hexdigest() or k == key.accessKey
+
« no previous file with comments | « misc/dashboard/builder/package.go ('k') | misc/dashboard/godashboard/gobuild.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b