summaryrefslogtreecommitdiff
path: root/muck/authz.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-10-27 10:37:28 +0300
committerLars Wirzenius <liw@liw.fi>2018-10-27 10:37:28 +0300
commitcc2d1b21e67643e237d968793d31b7b9437a1640 (patch)
tree538e35e25bbec03167063f7cfda2679e2232676c /muck/authz.py
parent7ed16628456d3c9946e4288bacda7a4195b61730 (diff)
downloadmuck-poc-cc2d1b21e67643e237d968793d31b7b9437a1640.tar.gz
Change: require method for authz
Diffstat (limited to 'muck/authz.py')
-rw-r--r--muck/authz.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/muck/authz.py b/muck/authz.py
index c48294c..a9d5dda 100644
--- a/muck/authz.py
+++ b/muck/authz.py
@@ -21,7 +21,10 @@ class AuthorizationChecker:
def __init__(self, signing_key_text):
self._tc = muck.TokenChecker(signing_key_text.strip().encode('ascii'))
- def request_is_allowed(self, r, required_scopes):
+ def request_is_allowed(self, r, required_method, required_scopes):
+ if r.get_method() != required_method:
+ return False
+
token = self._get_token(r)
if token is None:
return False