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)
|
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 = {
|
context = {
|
||||||
'id_credential': str(self.id),
|
'id_credential': str(self.id),
|
||||||
'vc_id': url_id,
|
'vc_id': url_id,
|
||||||
|
@ -709,6 +713,7 @@ class VerificableCredential(models.Model):
|
||||||
'lastName': self.user.last_name or "",
|
'lastName': self.user.last_name or "",
|
||||||
'email': self.user.email,
|
'email': self.user.email,
|
||||||
'organisation': org.name or '',
|
'organisation': org.name or '',
|
||||||
|
'credential_status_id': credential_status_id,
|
||||||
}
|
}
|
||||||
context.update(d)
|
context.update(d)
|
||||||
return context
|
return context
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"evidenceAssessment": "{{ evidenceAssessment }}"
|
"evidenceAssessment": "{{ evidenceAssessment }}"
|
||||||
},
|
},
|
||||||
"credentialStatus": {
|
"credentialStatus": {
|
||||||
"id": "{{ issuer_did }}",
|
"id": "{{ credential_status_id}}",
|
||||||
"type": "RevocationBitmap2022",
|
"type": "RevocationBitmap2022",
|
||||||
"revocationBitmapIndex": "{{ id_credential }}"
|
"revocationBitmapIndex": "{{ id_credential }}"
|
||||||
},
|
},
|
||||||
|
@ -68,4 +68,4 @@
|
||||||
"type": "FullJsonSchemaValidator2021"
|
"type": "FullJsonSchemaValidator2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
"email": "{{ email }}"
|
"email": "{{ email }}"
|
||||||
},
|
},
|
||||||
"credentialStatus": {
|
"credentialStatus": {
|
||||||
"id": "{{ issuer_did }}",
|
"id": "{{ credential_status_id}}",
|
||||||
"type": "RevocationBitmap2022",
|
"type": "RevocationBitmap2022",
|
||||||
"revocationBitmapIndex": "{{ id_credential }}"
|
"revocationBitmapIndex": "{{ id_credential }}"
|
||||||
},
|
},
|
||||||
|
@ -64,4 +64,4 @@
|
||||||
"id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
|
"id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
|
||||||
"type": "FullJsonSchemaValidator2021"
|
"type": "FullJsonSchemaValidator2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
"certificationDate": "{{ certificationDate }}"
|
"certificationDate": "{{ certificationDate }}"
|
||||||
},
|
},
|
||||||
"credentialStatus": {
|
"credentialStatus": {
|
||||||
"id": "{{ issuer_did }}",
|
"id": "{{ credential_status_id}}",
|
||||||
"type": "RevocationBitmap2022",
|
"type": "RevocationBitmap2022",
|
||||||
"revocationBitmapIndex": "{{ id_credential }}"
|
"revocationBitmapIndex": "{{ id_credential }}"
|
||||||
},
|
},
|
||||||
|
@ -75,4 +75,4 @@
|
||||||
"id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
|
"id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
|
||||||
"type": "FullJsonSchemaValidator2021"
|
"type": "FullJsonSchemaValidator2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
"assessmentDate": "{{ assessmentDate }}"
|
"assessmentDate": "{{ assessmentDate }}"
|
||||||
},
|
},
|
||||||
"credentialStatus": {
|
"credentialStatus": {
|
||||||
"id": "{{ issuer_did }}",
|
"id": "{{ credential_status_id}}",
|
||||||
"type": "RevocationBitmap2022",
|
"type": "RevocationBitmap2022",
|
||||||
"revocationBitmapIndex": "{{ id_credential }}"
|
"revocationBitmapIndex": "{{ id_credential }}"
|
||||||
},
|
},
|
||||||
|
@ -71,4 +71,4 @@
|
||||||
"id": "https://idhub.pangea.org/vc_schemas/financial-vulnerability.json",
|
"id": "https://idhub.pangea.org/vc_schemas/financial-vulnerability.json",
|
||||||
"type": "FullJsonSchemaValidator2021"
|
"type": "FullJsonSchemaValidator2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
"affiliatedUntil": "{{ affiliatedUntil }}"
|
"affiliatedUntil": "{{ affiliatedUntil }}"
|
||||||
},
|
},
|
||||||
"credentialStatus": {
|
"credentialStatus": {
|
||||||
"id": "{{ issuer_did }}",
|
"id": "{{ credential_status_id}}",
|
||||||
"type": "RevocationBitmap2022",
|
"type": "RevocationBitmap2022",
|
||||||
"revocationBitmapIndex": "{{ id_credential }}"
|
"revocationBitmapIndex": "{{ id_credential }}"
|
||||||
},
|
},
|
||||||
|
@ -70,4 +70,4 @@
|
||||||
"id": "https://idhub.pangea.org/vc_schemas/membership-card.json",
|
"id": "https://idhub.pangea.org/vc_schemas/membership-card.json",
|
||||||
"type": "FullJsonSchemaValidator2021"
|
"type": "FullJsonSchemaValidator2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue