aboutsummaryrefslogtreecommitdiff
path: root/app/handlers/base.py
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-07-24 17:45:59 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-07-24 17:45:59 +0200
commit7db35d68dd628b708f73f7d2749eec5aac925911 (patch)
tree0d1bcb5b87db8308fdec72f2a153f9f8ba8750a2 /app/handlers/base.py
parentb43c10d6272af8d379081b50d10531d639536cdf (diff)
First token base authorization work.
* Create @protected decorator for methods that will need to be token protected. * Draft APIToken model for the db. Change-Id: I831a2b9cb01872a6a8e2b5d6852cc89e0e65a62a
Diffstat (limited to 'app/handlers/base.py')
-rw-r--r--app/handlers/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/handlers/base.py b/app/handlers/base.py
index ef7729b..6ca39f9 100644
--- a/app/handlers/base.py
+++ b/app/handlers/base.py
@@ -38,6 +38,7 @@ from tornado.web import (
asynchronous,
)
+from handlers.decorators import protected
from models import (
AGGREGATE_KEY,
CREATED_KEY,
@@ -276,6 +277,7 @@ class BaseHandler(RequestHandler):
"""
self.write_error(status_code=501)
+ @protected
@asynchronous
def get(self, *args, **kwargs):
if kwargs and kwargs.get('id', None):