verification after signed credential

This commit is contained in:
Cayo Puigdefabregas 2024-02-16 00:25:04 +01:00
parent 55b19c6371
commit bb54eb0392
1 changed files with 5 additions and 0 deletions

View File

@ -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: