diff --git a/idhub/templates/credentials/e-operator-claim.json b/idhub/templates/credentials/e-operator-claim.json new file mode 100644 index 0000000..959472c --- /dev/null +++ b/idhub/templates/credentials/e-operator-claim.json @@ -0,0 +1,68 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://idhub.pangea.org/credentials/base/v1", + { + "legalName": "https://idhub.pangea.org/context/#legalName", + "accreditedBy": "https://idhub.pangea.org/context/#accreditedBy", + "operatorNumber": "https://idhub.pangea.org/context/#operatorNumber", + "limitJurisdiction": "https://idhub.pangea.org/context/#limitJurisdiction", + "accreditedFor": "https://idhub.pangea.org/context/#accreditedFor", + "role": "https://idhub.pangea.org/context/#role" + } + ], + "id": "{{ vc_id }}", + "type": [ + "VerifiableCredential", + "VerifiableAttestation", + "EOperatorClaim" + ], + "issuer": { + "id": "{{ issuer_did }}", + "name": "{{ organisation }}" + }, + "issuanceDate": "{{ issuance_date }}", + "validFrom": "{{ issuance_date }}", + "validUntil": "{{ validUntil }}", + "name": [ + { + "value": "Product and waste electronics operator claim", + "lang": "en" + }, + { + "value": "Declaració d'operador de productes i residus electrònics", + "lang": "ca_ES" + }, + { + "value": "Declaración de operador de productos y residuos electrónicos", + "lang": "es" + } + ], + "description": [ + { + "value": "Credential for e-product and e-waste operator claim", + "lang": "en" + }, + { + "value": "Credencial per operador de productes i residus electrònics", + "lang": "ca_ES" + }, + { + "value": "Credencial para operador de productos y residuos electrónicos", + "lang": "es" + } + ], + "credentialSubject": { + "id": "{{ subject_did }}", + "legalName": "{{ legalName }}", + "accreditedBy": "{{ accreditedBy }}", + "operatorNumber": "{{ operatorNumber }}", + "limitJurisdiction": "{{ limitJurisdiction }}", + "accreditedFor": "{{ accreditedFor }}", + "role": "{{ role }}" + }, + "credentialSchema": { + "id": "https://idhub.pangea.org/vc_schemas/federation-membership.json", + "type": "FullJsonSchemaValidator2021" + } + } \ No newline at end of file diff --git a/idhub/templates/credentials/membership-card.json b/idhub/templates/credentials/membership-card.json index 5ecda0a..cd10786 100644 --- a/idhub/templates/credentials/membership-card.json +++ b/idhub/templates/credentials/membership-card.json @@ -51,6 +51,7 @@ "firstName": "{{ firstName }}", "lastName": "{{ lastName }}", "email": "{{ email }}", + "role": "{{ role }}", "typeOfPerson": "{{ typeOfPerson }}", "identityDocType": "{{ identityDocType }}", "identityNumber": "{{ identityNumber }}", diff --git a/schemas/e-operator-claim.json b/schemas/e-operator-claim.json new file mode 100644 index 0000000..d3562e0 --- /dev/null +++ b/schemas/e-operator-claim.json @@ -0,0 +1,69 @@ +{ + "$id": "https://idhub.pangea.org/vc_schemas/eOperatorClaim.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EOperatorClaim", + "description": "Product and waste electronics operator claim, as proposed by eReuse.org", + "name": [ + { + "value": "Product and waste electronics operator claim", + "lang": "en" + }, + { + "value": "Declaració d'operador de productes i residus electrònics", + "lang": "ca_ES" + }, + { + "value": "Declaración de operador de productos y residuos electrónicos", + "lang": "es" + } + ], + "type": "object", + "allOf": [ + { + "$ref": "https://idhub.pangea.org/vc_schemas/ebsi/attestation.json" + }, + { + "properties": { + "credentialSubject": { + "description": "Defines properties on credentialSubject", + "type": "object", + "properties": { + "id": { + "description": "Defines a unique identifier of the credential subject", + "type": "string" + }, + "legalName": { + "description": "Legal name of the operator", + "type": "string" + }, + "accreditedBy": { + "description": "Legal name of the accrediting entity", + "type": "string" + }, + "operatorNumber": { + "description": "Operator number awarded by accrediting entity", + "type": "string" + }, + "limitJurisdiction": { + "description": "Regional scope", + "type": "string" + }, + "accreditedFor": { + "description": "Operation type: e.g. manufacture, repair, refurbishment, remanufacture, transport, dismantle, recycle, verification, audit", + "type": "string" + }, + "role": { + "description": "Role, either operator, witness, auditor", + "type": "string" + } + }, + "required": [ + "id", + "legalName", + "role" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/membership-card.json b/schemas/membership-card.json index 20a5f9b..3a624ba 100644 --- a/schemas/membership-card.json +++ b/schemas/membership-card.json @@ -74,6 +74,9 @@ "lastName": { "type": "string" }, + "role": { + "type": "string" + }, "email": { "type": "string", "format": "email"