Add valid did:key example

This commit is contained in:
Andy Miller (IMS) 2022-11-16 12:45:50 -08:00
parent 78c1cbe279
commit e096f1580b
2 changed files with 29 additions and 44 deletions

View File

@ -41,7 +41,6 @@ public class OB30Tests {
} }
@Test @Test
@Disabled("Do not have a valid sample")
void testSimpleDidMethodJsonValid() { void testSimpleDidMethodJsonValid() {
assertDoesNotThrow(()->{ assertDoesNotThrow(()->{
Report report = validator.run(Samples.OB30.JSON.SIMPLE_DID_METHOD_JSON.asFileResource()); Report report = validator.run(Samples.OB30.JSON.SIMPLE_DID_METHOD_JSON.asFileResource());

View File

@ -1,47 +1,33 @@
{ {
"@context": [ "@context" : [ "https://www.w3.org/2018/credentials/v1", "https://purl.imsglobal.org/spec/ob/v3p0/context.json", "https://purl.imsglobal.org/spec/ob/v3p0/extensions.json", "https://w3id.org/security/suites/ed25519-2020/v1" ],
"https://www.w3.org/2018/credentials/v1", "id" : "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584",
"https://purl.imsglobal.org/spec/ob/v3p0/context.json", "type" : [ "VerifiableCredential", "AchievementCredential" ],
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "http://example.com/credentials/3527",
"type": [
"VerifiableCredential",
"OpenBadgeCredential"
],
"issuer" : { "issuer" : {
"id": "https://example.com/issuers/876543", "type" : [ "Profile" ],
"type": [ "name" : "Andy F. Miller",
"Profile" "id" : "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164"
],
"name": "Example Corp"
}, },
"issuanceDate": "2010-01-01T00:00:00Z", "issuanceDate" : "2022-11-10T07:38:00-08:00",
"name": "Teamwork Badge", "name" : "test 1",
"credentialSubject" : { "credentialSubject" : {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21", "id" : "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164",
"type": [ "type" : [ "AchievementSubject" ],
"AchievementSubject"
],
"achievement" : { "achievement" : {
"id": "https://example.com/achievements/21st-century-skills/teamwork", "id" : "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510",
"type": [ "type" : [ "Achievement" ],
"Achievement" "achievementType" : "Achievement",
], "name" : "test 1",
"description" : "This is a test achievement",
"criteria" : { "criteria" : {
"narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management." "narrative" : "There is no criteria"
}, }
"description": "This badge recognizes the development of the capacity to collaborate within a group environment.",
"name": "Teamwork"
} }
}, },
"proof": [ "proof" : [ {
{
"type" : "Ed25519Signature2020", "type" : "Ed25519Signature2020",
"created": "2022-11-16T18:54:22Z", "created" : "2022-11-16T20:39:53Z",
"verificationMethod": "did:key:z6MknNHHrBzPytzu6CUBP9Lg7fg4KSBjzimc2Frh693YbMiv",
"proofPurpose" : "assertionMethod", "proofPurpose" : "assertionMethod",
"proofValue": "z5gJZKchSJEYPGeq6bsqiLKuxT6mXqAovPbqYX66CB7u9CSNFdV41vHtysjHFiitvoyhfPxsaZnWftrZZZW2txPQK" "verificationMethod" : "did:key:z6MkwAQmEfso8UjHJZTQajRtqR5hDxAD95iJD4z53XnKCFms",
} "proofValue" : "z361ueyGzREPvsWdnWUfkzTKXEd6u2DPPu2kDw3pDERJmzDFCqsuaPneqcRgz2hk9ycaNDYmC4Fy9c6S6BDDt5fVB"
] } ]
} }