Skip to content

Commit

Permalink
Merge pull request #29 from gunet/add-descriptor-fieldname
Browse files Browse the repository at this point in the history
added 'name' attribute on field for each presentation definition to have human-readable presentation success page
  • Loading branch information
kkmanos authored Jul 1, 2024
2 parents 0290e6a + 12a2d0f commit 045c436
Showing 1 changed file with 47 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const verifiableIdDescriptor = {
"constraints": {
"fields": [
{
"name": "Credential Type",
"path": [ '$.type' ],
"filter": {
"type": 'array',
Expand All @@ -29,18 +30,22 @@ const verifiableIdDescriptor = {
}
},
{
"name": "First Name",
"path": ['$.credentialSubject.firstName'],
"filter": {}
},
{
"name": "Last Name",
"path": ['$.credentialSubject.familyName'],
"filter": {}
},
{
"name": "Personal Identifier",
"path": ['$.credentialSubject.personalIdentifier'],
"filter": {}
},
{
"name": "Birthdate",
"path": ['$.credentialSubject.birthdate'],
"filter": {}
}
Expand All @@ -53,6 +58,7 @@ const verifiableIdDescriptorWithFirstnameLastname = {
"constraints": {
"fields": [
{
"name": "Credential Type",
"path": [ '$.type' ],
"filter": {
"type": 'array',
Expand All @@ -61,10 +67,12 @@ const verifiableIdDescriptorWithFirstnameLastname = {
}
},
{
"name": "First Name",
"path": ['$.credentialSubject.firstName'],
"filter": {}
},
{
"name": "Last Name",
"path": ['$.credentialSubject.familyName'],
"filter": {}
}
Expand All @@ -79,6 +87,7 @@ const europeanHealthInsuranceCardDescriptor = {
"constraints": {
"fields": [
{
"name": "Credential Type",
"path": [ '$.type' ],
"filter": {
"type": 'array',
Expand All @@ -87,30 +96,37 @@ const europeanHealthInsuranceCardDescriptor = {
}
},
{
"name": "SSN",
"path": ['$.credentialSubject.socialSecurityIdentification.ssn'],
"filter": {}
},
{
"name": "Starting Date",
"path": ['$.credentialSubject.validityPeriod.startingDate'],
"filter": {}
},
{
"name": "Ending Date",
"path": ['$.credentialSubject.validityPeriod.endingDate'],
"filter": {}
},
{
"name": "Document Id",
"path": ['$.credentialSubject.documentId'],
"filter": {}
},
{
"name": "Competent Institution Id",
"path": ['$.credentialSubject.competentInstitution.competentInstitutionId'],
"filter": {}
},
{
"name": "Competent Institution Name",
"path": ['$.credentialSubject.competentInstitution.competentInstitutionName'],
"filter": {}
},
{
"name": "Competent Institution Country Code",
"path": ['$.credentialSubject.competentInstitution.competentInstitutionCountryCode'],
"filter": {}
}
Expand All @@ -124,6 +140,7 @@ const Pda1Descriptor = {
"constraints": {
"fields": [
{
"name": "Credential Type",
"path": ['$.type'],
"filter": {
"type": 'array',
Expand All @@ -132,47 +149,73 @@ const Pda1Descriptor = {
}
},
{
"name": "SSN",
"path": ['$.credentialSubject.socialSecurityIdentification.ssn'],
"filter": {}
},
{
"name": "Starting Date",
"path": ['$.credentialSubject.decisionOnApplicableLegislation.validityPeriod.startingDate'],
"filter": {}
},
{
"name": "Ending Date",
"path": ['$.credentialSubject.decisionOnApplicableLegislation.validityPeriod.endingDate'],
"filter": {}
},
{
"name": "Document Id",
"path": ['$.credentialSubject.documentId'],
"filter": {}
},
{
"name": "Competent Institution Id",
"path": ['$.credentialSubject.competentInstitution.competentInstitutionId'],
"filter": {}
},
{
"name": "Competent Institution Name",
"path": ['$.credentialSubject.competentInstitution.competentInstitutionName'],
"filter": {}
},
{
"name": "Competent Institution Country Code",
"path": ['$.credentialSubject.competentInstitution.competentInstitutionCountryCode'],
"filter": {}
},
{
"path": ['$.credentialSubject.employer.employmentType'],
"name": "Name of Employer",
"path": ['$.credentialSubject.employer.name'],
"filter": {}
},
{
"path": ['$.credentialSubject.employer.name'],
"name": "Employer Id",
"path": ['$.credentialSubject.employer.employerId'],
"filter": {}
},
// {
// "name": "Employer Country Code",
// "path": ['$.credentialSubject.employer.countryCode'],
// "filter": {}
// },
{
"path": ['$.credentialSubject.employer.employerId'],
"name": "Place of Work Town",
"path": ['$.credentialSubject.placeOfWork.town'],
"filter": {}
},
{
"name": "Place of Work Postal Code",
"path": ['$.credentialSubject.placeOfWork.postalCode'],
"filter": {}
},
{
"name": "Place of Work Country Code",
"path": ['$.credentialSubject.placeOfWork.countryCode'],
"filter": {}
},
{
"path": ['$.credentialSubject.employer.typeOfId'],
"name": "Member State Legislation",
"path": ['$.credentialSubject.decisionOnApplicableLegislation.decisionOnMSWhoseLegislationApplies.memberStateWhoseLegislationIsToBeApplied'],
"filter": {}
}
]
Expand Down

0 comments on commit 045c436

Please sign in to comment.