summaryrefslogtreecommitdiffstats
path: root/custodia/message/formats.py
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-06-04 15:44:01 -0400
committerSimo Sorce <simo@redhat.com>2015-06-04 16:55:27 -0400
commita5035f59f3b0293dcf42e5e7b69143bc1eb3281a (patch)
tree7f42e632d0e2314c13ddf1fb52e24361c04ce9ff /custodia/message/formats.py
parent7e7450a7a20b29d141bc9e189c6fc563a03bb6b9 (diff)
downloadcustodia-a5035f59f3b0293dcf42e5e7b69143bc1eb3281a.tar.gz
custodia-a5035f59f3b0293dcf42e5e7b69143bc1eb3281a.tar.xz
custodia-a5035f59f3b0293dcf42e5e7b69143bc1eb3281a.zip
Change KEM Parsing to actually check claims
The name ('sub') and the time ('exp') must be checked before letting the reuqest proceed. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'custodia/message/formats.py')
-rw-r--r--custodia/message/formats.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/custodia/message/formats.py b/custodia/message/formats.py
index 00845a3..8093ba7 100644
--- a/custodia/message/formats.py
+++ b/custodia/message/formats.py
@@ -27,7 +27,7 @@ class Validator(object):
def add_types(self, types):
self.types.update(types)
- def parse(self, request, msg):
+ def parse(self, request, msg, name):
if not isinstance(msg, dict):
raise InvalidMessage('The message must be a dict')
@@ -59,5 +59,5 @@ class Validator(object):
msg_type,))
handler = self.types[msg_type](request)
- handler.parse(msg_value)
+ handler.parse(msg_value, name)
return handler