forked from trustbloc/adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [WACI-Issuance] Support to pass credential output descriptors
closes trustbloc#561 Signed-off-by: talwinder50 <[email protected]>
- Loading branch information
1 parent
5d5deae
commit eb8eb75
Showing
10 changed files
with
456 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 195 additions & 0 deletions
195
cmd/adapter-rest/startcmd/testdata/outputdescriptors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
[ | ||
{ | ||
"id": "udc_output", | ||
"schema": "https://www.w3.org/2018/credentials/examples/v1", | ||
"display": { | ||
"title": { | ||
"path": [ | ||
"$.title", | ||
"$.vc.title" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "Bachelor's Degree" | ||
}, | ||
"subtitle": { | ||
"path": [ | ||
"$.minor", | ||
"$.vc.minor" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "" | ||
}, | ||
"description": { | ||
"text": "Awarded for completing a four year program at Example University." | ||
}, | ||
"properties": [ | ||
{ | ||
"path": [ | ||
"$.name", | ||
"$.credentialSubject.name" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "Not Applicable", | ||
"label": "Degree Holder's name" | ||
}, | ||
{ | ||
"path": [ | ||
"$.credentialSubject.degree.type" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "Unknown", | ||
"label": "Degree" | ||
} | ||
] | ||
}, | ||
"styles": { | ||
"thumbnail": { | ||
"uri": "http://example-university.org/logo.png", | ||
"alt": "Example University logo" | ||
}, | ||
"hero": { | ||
"uri": "http://example-university.org/hero.png", | ||
"alt": "Example University students in graduation ceremony" | ||
}, | ||
"background": { | ||
"color": "#ff0000" | ||
}, | ||
"text": { | ||
"color": "#d4d400" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "prc_output", | ||
"schema": "https://w3id.org/citizenship/v1", | ||
"display": { | ||
"title": { | ||
"path": [ | ||
"$.name", | ||
"$.vc.name" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "Permanent Resident Card" | ||
}, | ||
"subtitle": { | ||
"path": [ | ||
"$.description", | ||
"$.vc.description" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "" | ||
}, | ||
"description": { | ||
"text": "PR card of John Smith." | ||
}, | ||
"properties": [ | ||
{ | ||
"path": [ | ||
"$.credentialSubject.givenName" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "Not Applicable", | ||
"label": "Card Holder's first name" | ||
}, | ||
{ | ||
"path": [ | ||
"$.credentialSubject.familyName" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback": "Unknown", | ||
"label": "Card Holder's family name" | ||
} | ||
] | ||
}, | ||
"styles": { | ||
"thumbnail": { | ||
"uri": "http://example-university.org/logo.png", | ||
"alt": "Example University logo" | ||
}, | ||
"hero": { | ||
"uri": "http://example-university.org/hero.png", | ||
"alt": "Example University students in graduation ceremony" | ||
}, | ||
"background": { | ||
"color": "#ff0000" | ||
}, | ||
"text": { | ||
"color": "#d4d400" | ||
} | ||
} | ||
}, | ||
{ | ||
"id":"driver_license_output", | ||
"schema":"https://schema.org/EducationalOccupationalCredential", | ||
"display":{ | ||
"title":{ | ||
"path":[ | ||
"$.name", | ||
"$.vc.name" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback":"Washington State Driver License" | ||
}, | ||
"subtitle":{ | ||
"path":[ | ||
"$.class", | ||
"$.vc.class" | ||
], | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"fallback":"Class A, Commercial" | ||
}, | ||
"description":{ | ||
"text":"License to operate a vehicle with a gross combined weight rating (GCWR) of 26,001 or more pounds, as long as the GVWR of the vehicle(s) being towed is over 10,000 pounds." | ||
}, | ||
"properties":[ | ||
{ | ||
"path":[ | ||
"$.donor", | ||
"$.credentialSubject.license.number" | ||
], | ||
"schema": { | ||
"type": "boolean" | ||
}, | ||
"fallback":"Unknown", | ||
"label":"Driving License Number" | ||
} | ||
] | ||
}, | ||
"styles":{ | ||
"thumbnail":{ | ||
"uri":"https://dol.wa.com/logo.png", | ||
"alt":"Washington State Seal" | ||
}, | ||
"hero":{ | ||
"uri":"https://dol.wa.com/happy-people-driving.png", | ||
"alt":"Happy people driving" | ||
}, | ||
"background":{ | ||
"color":"#ff0000" | ||
}, | ||
"text":{ | ||
"color":"#d4d400" | ||
} | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.