forked from trustbloc/vcs
-
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: Validate issuer claims against JSON schema (trustbloc#1381)
Added a JSON schema field to the credentialTemplate profile element. If the "jsonSchema" field is not empty then the issuer claims are validated against the schema. Signed-off-by: Bob Stasyszyn <[email protected]>
- Loading branch information
1 parent
6421291
commit f3207e9
Showing
10 changed files
with
366 additions
and
14 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
29 changes: 29 additions & 0 deletions
29
pkg/restapi/v1/issuer/testdata/sample_vc_invalid_university_degree.jsonld
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,29 @@ | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1", | ||
"https://w3id.org/security/bbs/v1" | ||
], | ||
"credentialSchema": [], | ||
"credentialSubject": { | ||
"alumniOf": { | ||
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1" | ||
}, | ||
"degree": { | ||
"type": "BachelorDegree", | ||
"name": "Bachelor of Science and Arts" | ||
} | ||
}, | ||
"expirationDate": "2038-01-19T03:14:00Z", | ||
"id": "http://example.edu/credentials/1872", | ||
"issuanceDate": "2010-01-01T19:23:24Z", | ||
"issuer": { | ||
"id": "did:example:76e12ec712ebc6f1c221ebfeb1f", | ||
"name": "Example University" | ||
}, | ||
"referenceNumber": 83294847, | ||
"type": [ | ||
"VerifiableCredential", | ||
"UniversityDegreeCredential" | ||
] | ||
} |
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.