fix sing vp
This commit is contained in:
parent
31192aac56
commit
cd2b5404fb
|
@ -78,11 +78,13 @@ class AuthorizeForm(forms.Form):
|
|||
|
||||
context = {
|
||||
"holder_did": did.did,
|
||||
"verificable_credentials": vc_list,
|
||||
"id": str(uuid.uuid4())
|
||||
}
|
||||
unsigned_vp = vp_template.render(context)
|
||||
vp = json.loads(unsigned_vp)
|
||||
vp["verifiableCredential"] = vc_list
|
||||
vp_str = json.dumps(vp)
|
||||
|
||||
key_material = did.get_key_material()
|
||||
self.vp = sign(key_material, unsigned_vp, did.did)
|
||||
self.vp = sign(vp_str, key_material, did.did)
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1"
|
||||
],
|
||||
"id": "{{ id }}"",
|
||||
"id": "{{ id }}",
|
||||
"type": [
|
||||
"VerifiablePresentation"
|
||||
],
|
||||
"holder": "{{ holder_did }}",
|
||||
"verifiableCredential": {{ verificable_credentials }}
|
||||
"verifiableCredential": ""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue