diff --git a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB30Tests.java b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB30Tests.java index 4e316b6..277788f 100644 --- a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB30Tests.java +++ b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB30Tests.java @@ -379,4 +379,14 @@ public class OB30Tests { assertHasProbeID(report, RevocationListProbe.ID, true); }); } + + @Test + void testEddsa2022Valid() { + assertDoesNotThrow(()->{ + Report report = validator.run(Samples.OB30.JSON.SIMPLE_EDDSA_20222_JSON.asFileResource()); + if(verbose) PrintHelper.print(report, true); + assertValid(report); + }); + + } } diff --git a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java index ab68d9a..8a96657 100644 --- a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java +++ b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java @@ -11,6 +11,7 @@ public class Samples { public static final class JSON { public final static Sample COMPLETE_JSON = new Sample("ob30/complete.json", false); public final static Sample SIMPLE_JSON = new Sample("ob30/simple.json", true); + public final static Sample SIMPLE_EDDSA_20222_JSON = new Sample("ob30/simple-eddsa-2022.json", true); public final static Sample SIMPLE_DID_KEY_METHOD_JSON = new Sample("ob30/simple-did-key-method.json", true); public final static Sample SIMPLE_DID_WEB_METHOD_JSON = new Sample("ob30/simple-did-web-method.json", true); public final static Sample SIMPLE_MULTIPLE_PROOF_JSON = new Sample("ob30/simple-multiple-proofs.json", true); diff --git a/inspector-vc/src/test/resources/ob30/simple-eddsa-2022.json b/inspector-vc/src/test/resources/ob30/simple-eddsa-2022.json new file mode 100644 index 0000000..bf699a5 --- /dev/null +++ b/inspector-vc/src/test/resources/ob30/simple-eddsa-2022.json @@ -0,0 +1,31 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.1.json", + "https://w3id.org/security/data-integrity/v1" + ], + "type": ["VerifiableCredential", "AchievementCredential"], + "id": "http://www.1edtech.org/ob/1", + "issuanceDate": "2022-11-27T00:00:00Z", + "credentialSubject": { + "type": "AchievementSubject", + "id": "did:1edtech:1", + "achievement": { + "id": "did:1edtech:achievement:1", + "type": ["Achievement"], + "criteria": { "narrative": "some narrative" }, + "description": "some description", + "name": "some name" + } + }, + "name": "Some name", + "issuer": { "id": "https://example.com/issuers/876543", "type": ["Profile"] }, + "proof": { + "type": "DataIntegrityProof", + "created": "2023-05-29T08:42:26Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "https://example.com/issuers/876543#z6MkjZRZv3aez3r18pB1RBFJR1kwUVJ5jHt92JmQwXbd5hwi", + "cryptosuite": "eddsa-2022", + "proofValue": "z2H1miRAGKPRCPUSudNTPrsWyvpRZzgtgjPBmnMkbcwR8StwEv8dr3NigviBgvZwBu8yA7wAyF5qLjyo3zN1UqLR2" + } +} \ No newline at end of file