add credentialStatus to templates

This commit is contained in:
Cayo Puigdefabregas 2024-02-14 17:08:41 +01:00
parent 8149c2411c
commit d2a49b7f20
6 changed files with 26 additions and 0 deletions

View File

@ -666,6 +666,7 @@ class VerificableCredential(models.Model):
) )
context = { context = {
'id_credential': self.id,
'vc_id': url_id, 'vc_id': url_id,
'issuer_did': self.issuer_did.did, 'issuer_did': self.issuer_did.did,
'subject_did': self.subject_did and self.subject_did.did or '', 'subject_did': self.subject_did and self.subject_did.did or '',

View File

@ -58,6 +58,11 @@
"dateOfAssessment": "{{ dateOfAssessment }}", "dateOfAssessment": "{{ dateOfAssessment }}",
"evidenceAssessment": "{{ evidenceAssessment }}" "evidenceAssessment": "{{ evidenceAssessment }}"
}, },
"credentialStatus": {
"id": "{{ issuer_did }}",
"type": "RevocationBitmap2022",
"revocationBitmapIndex": "{{ id_credential }}"
},
"credentialSchema": { "credentialSchema": {
"id": "https://idhub.pangea.org/vc_schemas/course-credential.json", "id": "https://idhub.pangea.org/vc_schemas/course-credential.json",
"type": "FullJsonSchemaValidator2021" "type": "FullJsonSchemaValidator2021"

View File

@ -55,6 +55,11 @@
"role": "{{ role }}", "role": "{{ role }}",
"email": "{{ email }}" "email": "{{ email }}"
}, },
"credentialStatus": {
"id": "{{ issuer_did }}",
"type": "RevocationBitmap2022",
"revocationBitmapIndex": "{{ id_credential }}"
},
"credentialSchema": { "credentialSchema": {
"id": "https://idhub.pangea.org/vc_schemas/federation-membership.json", "id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
"type": "FullJsonSchemaValidator2021" "type": "FullJsonSchemaValidator2021"

View File

@ -66,6 +66,11 @@
"evidence": "{{ evidence }}", "evidence": "{{ evidence }}",
"certificationDate": "{{ certificationDate }}" "certificationDate": "{{ certificationDate }}"
}, },
"credentialStatus": {
"id": "{{ issuer_did }}",
"type": "RevocationBitmap2022",
"revocationBitmapIndex": "{{ id_credential }}"
},
"credentialSchema": { "credentialSchema": {
"id": "https://idhub.pangea.org/vc_schemas/federation-membership.json", "id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
"type": "FullJsonSchemaValidator2021" "type": "FullJsonSchemaValidator2021"

View File

@ -62,6 +62,11 @@
"connectivityOptionList": "{{ connectivityOptionList }}", "connectivityOptionList": "{{ connectivityOptionList }}",
"assessmentDate": "{{ assessmentDate }}" "assessmentDate": "{{ assessmentDate }}"
}, },
"credentialStatus": {
"id": "{{ issuer_did }}",
"type": "RevocationBitmap2022",
"revocationBitmapIndex": "{{ id_credential }}"
},
"credentialSchema": { "credentialSchema": {
"id": "https://idhub.pangea.org/vc_schemas/financial-vulnerability.json", "id": "https://idhub.pangea.org/vc_schemas/financial-vulnerability.json",
"type": "FullJsonSchemaValidator2021" "type": "FullJsonSchemaValidator2021"

View File

@ -61,6 +61,11 @@
"affiliatedSince": "{{ affiliatedSince }}", "affiliatedSince": "{{ affiliatedSince }}",
"affiliatedUntil": "{{ affiliatedUntil }}" "affiliatedUntil": "{{ affiliatedUntil }}"
}, },
"credentialStatus": {
"id": "{{ issuer_did }}",
"type": "RevocationBitmap2022",
"revocationBitmapIndex": "{{ id_credential }}"
},
"credentialSchema": { "credentialSchema": {
"id": "https://idhub.pangea.org/vc_schemas/membership-card.json", "id": "https://idhub.pangea.org/vc_schemas/membership-card.json",
"type": "FullJsonSchemaValidator2021" "type": "FullJsonSchemaValidator2021"