new credential membership

This commit is contained in:
Cayo Puigdefabregas 2023-12-15 17:52:08 +01:00
parent 8ee3f561a4
commit 45f30f3664
3 changed files with 154 additions and 163 deletions

View file

@ -1,2 +1,2 @@
name surnames email typeOfPerson membershipType organisation affiliatedSince
Pepe Gómez user1@example.org individual Member Pangea 01-01-2023
firstName lastName email membershipType membershipId affiliatedUntil affiliatedSince typeOfPerson identityDocType identityNumber
Pepe Gómez user1@example.org individual 123456 2024-01-01T00:00:00Z 2023-01-01T00:00:00Z natural DNI 12345678A

1 name firstName surnames lastName email membershipType membershipId organisation affiliatedUntil affiliatedSince typeOfPerson identityDocType identityNumber
2 Pepe Pepe Gómez Gómez user1@example.org Member individual 123456 Pangea 2024-01-01T00:00:00Z 01-01-2023 2023-01-01T00:00:00Z individual natural DNI 12345678A

View file

@ -1,61 +1,23 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"individual": "https://schema.org/Person",
"Member": "https://schema.org/Member",
"startDate": "https://schema.org/startDate",
"jsonSchema": "https://schema.org/jsonSchema",
"$ref": "https://schema.org/jsonSchemaRef",
"credentialSchema": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#credentialSchema",
"organisation": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#organisation",
"membershipType": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#membershipType",
"membershipId": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#membershipId",
"typeOfPerson": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#typeOfPerson",
"identityDocType": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#identityDocType",
"identityNumber": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#identityNumber",
"name": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#name",
"description": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#description",
"value": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#value",
"lang": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#lang",
"surnames": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#surnames",
"email": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#email",
"affiliatedSince": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#affiliatedSince",
"affiliatedUntil": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#affiliatedUntil",
"issued": "https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Verifiable+Attestation#issued",
"validFrom": "https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Verifiable+Attestation#validFrom",
"validUntil": "https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Verifiable+Attestation#validUntil"
}
"https://idhub.pangea.org/credentials/base/v1",
"https://idhub.pangea.org/credentials/membership-card/v1"
],
"type": [
"VerifiableCredential",
"VerifiableAttestation",
"MembershipCard"
],
"id": "{{ vc_id }}",
"id": "https://idhub.pangea.org/credentials/987654321",
"issuer": {
"id": "{{ issuer_did }}",
"name": "Pangea",
"description": [
{
"value": "Pangea.org is a service provider leveraging open-source technologies to provide affordable and accessible solutions for social enterprises and solidarity organisations.",
"lang": "en"
"id": "did:example:5678",
"name": "Pangea Internet Solidari"
},
{
"value": "Pangea.org és un proveïdor de serveis que aprofita les tecnologies de codi obert per oferir solucions assequibles i accessibles per a empreses socials i organitzacions solidàries.",
"lang": "ca_ES"
},
{
"value": "Pangea.org es un proveedor de servicios que aprovecha tecnologías de código abierto para proporcionar soluciones asequibles y accesibles para empresas sociales y organizaciones solidarias.",
"lang": "es"
}
]
},
"issuanceDate": "{{ issuance_date }}",
"issued": "{{ issuance_date }}",
"validFrom": "{{ issuance_date }}",
"validUntil": "{{ validUntil }}",
"issuanceDate": "2023-12-06T19:23:24Z",
"issued": "2023-12-06T19:23:24Z",
"validFrom": "2023-12-06T19:23:24Z",
"validUntil": "2024-12-06T19:23:24Z",
"name": [
{
"value": "Membership Card",
@ -85,21 +47,21 @@
}
],
"credentialSubject": {
"id": "{{ subject_did }}",
"id": "did:example:1234",
"firstName": "Joan",
"lastName": "Pera",
"email": "joan.pera@pangea.org",
"typeOfPerson": "natural",
"identityDocType": "DNI",
"identityNumber": "12345678A",
"organisation": "Pangea",
"membershipType": "{{ membershipType }}",
"membershipId": "{{ vc_id }}",
"affiliatedSince": "{{ affiliatedSince }}",
"affiliatedUntil": "{{ affiliatedUntil }}",
"typeOfPerson": "{{ typeOfPerson }}",
"identityDocType": "{{ identityDocType }}",
"identityNumber": "{{ identityNumber }}",
"name": "{{ first_name }}",
"surnames": "{{ last_name }}",
"email": "{{ email }}",
"membershipType": "individual",
"membershipId": "123456",
"affiliatedSince": "2023-01-01T00:00:00Z",
"affiliatedUntil": "2024-01-01T00:00:00Z"
},
"credentialSchema": {
"id": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/membership-card-schema.json",
"type": "JsonSchema"
}
"id": "https://idhub.pangea.org/vc_schemas/membership-card.json",
"type": "FullJsonSchemaValidator2021"
}
}

View file

@ -1,17 +1,47 @@
{
"$id": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/membership-card-schema.json",
"$id": "https://idhub.pangea.org/vc_schemas/membership-card.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "MembershipCard",
"description": "MembershipCard credential using JsonSchema",
"title": "Membership Card",
"description": "The membership card specifies an individual's subscription or enrollment in specific services or benefits issued by an organization.",
"name": [
{
"value": "Membership Card",
"lang": "en"
},
{
"value": "Carnet de soci/a",
"lang": "ca_ES"
},
{
"value": "Carnet de socio/a",
"lang": "es"
}
],
"type": "object",
"allOf": [
{
"$ref": "https://idhub.pangea.org/vc_schemas/ebsi/attestation.json"
},
{
"properties": {
"credentialSubject": {
"description": "Defines additional properties on credentialSubject",
"type": "object",
"properties": {
"id": {
"description": "Defines a unique identifier of the credential subject",
"type": "string"
},
"organisation": {
"description": "Organisation the credential subject is affiliated with",
"type": "string"
},
"membershipType": {
"description": "Type of membership",
"type": "string"
},
"membershipId": {
"description": "Membership identifier",
"type": "string"
},
"affiliatedSince": {
@ -25,26 +55,23 @@
"typeOfPerson": {
"type": "string",
"enum": [
"individual",
"org"
"natural",
"legal"
]
},
"identityDocType": {
"type": "string",
"enum": [
"DNI",
"NIF",
"NIE",
"PASSPORT"
]
"description": "Type of the Identity Document of the credential subject",
"type": "string"
},
"identityNumber": {
"description": "Number of the Identity Document of the credential subject",
"type": "string"
},
"name": {
"firstName": {
"description": "Name of the natural person or name of the legal person (organisation)",
"type": "string"
},
"surnames": {
"lastName": {
"type": "string"
},
"email": {
@ -53,13 +80,15 @@
}
},
"required": [
"id",
"organisation",
"affiliatedSince",
"typeOfPerson",
"name",
"surnames",
"firstName",
"email"
]
}
}
}
]
}