From bb54eb039229caa3ac12618b1cb22851ef737c62 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 16 Feb 2024 00:25:04 +0100 Subject: [PATCH] verification after signed credential --- idhub/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/idhub/models.py b/idhub/models.py index 7e6f847..ae61c56 100644 --- a/idhub/models.py +++ b/idhub/models.py @@ -16,6 +16,7 @@ from utils.idhub_ssikit import ( keydid_from_controller_key, sign_credential, webdid_from_controller_key, + verify_credential, ) from idhub_auth.models import User @@ -669,6 +670,10 @@ class VerificableCredential(models.Model): self.render(domain), self.issuer_did.get_key_material(issuer_pass) ) + valid, reason = verify_credential(data) + if not valid: + return + if self.eidas1_did: self.data = data else: