add url in credentialStatus for key dids
This commit is contained in:
parent
1401148247
commit
e81837bd4e
|
@ -699,6 +699,10 @@ class VerificableCredential(models.Model):
|
|||
|
||||
org = Organization.objects.get(main=True)
|
||||
|
||||
credential_status_id = 'https://revocation.not.supported/'
|
||||
if self.issuer_did.type == DID.Types.WEB:
|
||||
credential_status_id = self.issuer_did.did
|
||||
|
||||
context = {
|
||||
'id_credential': str(self.id),
|
||||
'vc_id': url_id,
|
||||
|
@ -709,6 +713,7 @@ class VerificableCredential(models.Model):
|
|||
'lastName': self.user.last_name or "",
|
||||
'email': self.user.email,
|
||||
'organisation': org.name or '',
|
||||
'credential_status_id': credential_status_id,
|
||||
}
|
||||
context.update(d)
|
||||
return context
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"evidenceAssessment": "{{ evidenceAssessment }}"
|
||||
},
|
||||
"credentialStatus": {
|
||||
"id": "{{ issuer_did }}",
|
||||
"id": "{{ credential_status_id}}",
|
||||
"type": "RevocationBitmap2022",
|
||||
"revocationBitmapIndex": "{{ id_credential }}"
|
||||
},
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
"email": "{{ email }}"
|
||||
},
|
||||
"credentialStatus": {
|
||||
"id": "{{ issuer_did }}",
|
||||
"id": "{{ credential_status_id}}",
|
||||
"type": "RevocationBitmap2022",
|
||||
"revocationBitmapIndex": "{{ id_credential }}"
|
||||
},
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
"certificationDate": "{{ certificationDate }}"
|
||||
},
|
||||
"credentialStatus": {
|
||||
"id": "{{ issuer_did }}",
|
||||
"id": "{{ credential_status_id}}",
|
||||
"type": "RevocationBitmap2022",
|
||||
"revocationBitmapIndex": "{{ id_credential }}"
|
||||
},
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"assessmentDate": "{{ assessmentDate }}"
|
||||
},
|
||||
"credentialStatus": {
|
||||
"id": "{{ issuer_did }}",
|
||||
"id": "{{ credential_status_id}}",
|
||||
"type": "RevocationBitmap2022",
|
||||
"revocationBitmapIndex": "{{ id_credential }}"
|
||||
},
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
"affiliatedUntil": "{{ affiliatedUntil }}"
|
||||
},
|
||||
"credentialStatus": {
|
||||
"id": "{{ issuer_did }}",
|
||||
"id": "{{ credential_status_id}}",
|
||||
"type": "RevocationBitmap2022",
|
||||
"revocationBitmapIndex": "{{ id_credential }}"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue