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 9e75372..6bd24ba 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 @@ -1,10 +1,16 @@ package org.oneedtech.inspect.vc; -import static org.junit.jupiter.api.Assertions.*; -import static org.oneedtech.inspect.test.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.oneedtech.inspect.test.Assertions.assertErrorCount; +import static org.oneedtech.inspect.test.Assertions.assertFatalCount; +import static org.oneedtech.inspect.test.Assertions.assertHasProbeID; +import static org.oneedtech.inspect.test.Assertions.assertInvalid; +import static org.oneedtech.inspect.test.Assertions.assertValid; +import static org.oneedtech.inspect.test.Assertions.assertWarning; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.oneedtech.inspect.core.Inspector.Behavior; import org.oneedtech.inspect.core.probe.json.JsonSchemaProbe; @@ -12,13 +18,13 @@ import org.oneedtech.inspect.core.report.Report; import org.oneedtech.inspect.test.PrintHelper; import org.oneedtech.inspect.vc.probe.ContextPropertyProbe; import org.oneedtech.inspect.vc.probe.CredentialSubjectProbe; +import org.oneedtech.inspect.vc.probe.EmbeddedProofProbe; +import org.oneedtech.inspect.vc.probe.EvidenceProbe; import org.oneedtech.inspect.vc.probe.ExpirationProbe; import org.oneedtech.inspect.vc.probe.InlineJsonSchemaProbe; import org.oneedtech.inspect.vc.probe.IssuanceProbe; import org.oneedtech.inspect.vc.probe.IssuerProbe; import org.oneedtech.inspect.vc.probe.RevocationListProbe; -import org.oneedtech.inspect.vc.probe.EmbeddedProofProbe; -import org.oneedtech.inspect.vc.probe.EvidenceProbe; import org.oneedtech.inspect.vc.probe.TypePropertyProbe; import com.google.common.collect.Iterables; @@ -44,6 +50,15 @@ public class OB30Tests { }); } + @Test + void testSimple1ObValid() { + assertDoesNotThrow(()->{ + Report report = validator.run(Samples.OB30.JSON.SIMPLE_1OB.asFileResource()); + if(verbose) PrintHelper.print(report, true); + assertValid(report); + }); + } + @Test void testSimpleV1JsonValid() { assertDoesNotThrow(()->{ @@ -402,6 +417,19 @@ public class OB30Tests { }); } + @Test + void testCompleteV1JsonInvalidInlineSchemaRef() throws Exception { + //404 inline schema ref + assertDoesNotThrow(()->{ + Report report = validator.run(Samples.OB30.JSON.COMPLETE_V1_JSON.asFileResource()); + if(verbose) PrintHelper.print(report, true); + assertFalse(report.asBoolean()); + assertTrue(Iterables.size(report.getErrors()) > 0); + // assertTrue(Iterables.size(report.getExceptions()) > 0); + assertHasProbeID(report, InlineJsonSchemaProbe.ID, true); + }); + } + @Test void testCredentialStatusRevoked() { // the credential is valid, but credentialStatus reveals it is revoked 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 a2b174b..d36ba47 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,8 +11,10 @@ public class Samples { } public static final class JSON { public final static Sample COMPLETE_JSON = new Sample("ob30/complete.json", false); + public final static Sample COMPLETE_V1_JSON = new Sample("ob30/complete_v1.json", false); public final static Sample SIMPLE_JSON = new Sample("ob30/simple.json", true); public final static Sample SIMPLE_V1_JSON = new Sample("ob30/simple_v1.json", true); + public final static Sample SIMPLE_1OB = new Sample("ob30/simple.1ob", 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); diff --git a/inspector-vc/src/test/resources/ob30/complete.json b/inspector-vc/src/test/resources/ob30/complete.json index ac26bae..d90eb85 100644 --- a/inspector-vc/src/test/resources/ob30/complete.json +++ b/inspector-vc/src/test/resources/ob30/complete.json @@ -1,716 +1,723 @@ -{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://purl.imsglobal.org/spec/ob/v3p0/context.json", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "id": "http://1edtech.edu/credentials/3732", - "type": [ - "VerifiableCredential", - "OpenBadgeCredential" - ], - "name": "1EdTech University Degree for Example Student", - "description": "1EdTech University Degree Description", - "image": { - "id": "https://1edtech.edu/credentials/3732/image", - "type": "Image", - "caption": "1EdTech University Degree for Example Student" - }, - "credentialSubject": { - "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", - "type": [ - "AchievementSubject" - ], - "activityEndDate": "2010-01-02T00:00:00Z", - "activityStartDate": "2010-01-01T00:00:00Z", - "creditsEarned": 42, - "licenseNumber": "A-9320041", - "role": "Major Domo", - "source": { - "id": "https://school.edu/issuers/201234", - "type": [ - "Profile" - ], - "name": "1EdTech College of Arts" - }, - "term": "Fall", - "identifier": [ - { - "type": "IdentityObject", - "identityHash": "student@1edtech.edu", - "identityType": "email", - "hashed": false, - "salt": "not-used" - }, - { - "type": "IdentityObject", - "identityHash": "somebody@gmail.com", - "identityType": "email", - "hashed": false, - "salt": "not-used" - } - ], - "achievement": { - "id": "https://1edtech.edu/achievements/degree", - "type": [ - "Achievement" - ], - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "degree", - "targetDescription": "1EdTech University Degree programs.", - "targetName": "1EdTech University Degree", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFItem", - "targetUrl": "https://1edtech.edu/catalog/degree" - }, - { - "type": [ - "Alignment" - ], - "targetCode": "degree", - "targetDescription": "1EdTech University Degree programs.", - "targetName": "1EdTech University Degree", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CTDL", - "targetUrl": "https://credentialengineregistry.org/resources/ce-98cb027b-95ef-4494-908d-6f7790ec6b6b" - } - ], - "achievementType": "Degree", - "creator": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "Profile" - ], - "name": "1EdTech University", - "url": "https://1edtech.edu", - "phone": "1-222-333-4444", - "description": "1EdTech University provides online degree programs.", - "endorsement": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://purl.imsglobal.org/spec/ob/v3p0/context.json", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "type": [ - "VerifiableCredential", - "EndorsementCredential" - ], - "issuer": { - "id": "https://accrediter.edu/issuers/565049", - "type": [ - "Profile" - ], - "name": "Example Accrediting Agency" - }, - "name": "Example endorsement", - "issuanceDate": "2010-01-01T00:00:00Z", - "expirationDate": "2020-01-01T00:00:00Z", - "credentialSubject": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "EndorsementSubject" - ], - "endorsementComment": "1EdTech University is in good standing" - }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", - "type": "1EdTechJsonSchemaValidator2019" - }, - { - "id": "https://accrediter.edu/schema/endorsementcredential.json", - "type": "JsonSchemaValidator2018" - } - ], - "credentialStatus": { - "id": "https://1edtech.edu/credentials/3732/revocations", - "type": "1EdTechRevocationList" - }, - "refreshService": { - "id": "http://1edtech.edu/credentials/3732", - "type": "1EdTechCredentialRefresh" - }, - "proof": [ - { - "type": "Ed25519Signature2020", - "created": "2022-05-26T18:17:08Z", - "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", - "proofPurpose": "assertionMethod", - "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" - } - ] - }, - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://purl.imsglobal.org/spec/ob/v3p0/context.json", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "type": [ - "VerifiableCredential", - "EndorsementCredential" - ], - "issuer": { - "id": "https://state.gov/issuers/565049", - "type": [ - "Profile" - ], - "name": "State Department of Education" - }, - "issuanceDate": "2010-01-01T00:00:00Z", - "expirationDate": "2020-01-01T00:00:00Z", - "credentialSubject": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "EndorsementSubject" - ], - "endorsementComment": "1EdTech University is in good standing" - }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", - "type": "1EdTechJsonSchemaValidator2019" - }, - { - "id": "https://state.gov/schema/endorsementcredential.json", - "type": "JsonSchemaValidator2018" - } - ], - "credentialStatus": { - "id": "https://state.gov/credentials/3732/revocations", - "type": "1EdTechRevocationList" - }, - "refreshService": { - "id": "http://state.gov/credentials/3732", - "type": "1EdTechCredentialRefresh" - }, - "proof": [ - { - "type": "Ed25519Signature2020", - "created": "2022-05-26T18:25:59Z", - "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", - "proofPurpose": "assertionMethod", - "proofValue": "z5bDnmSgDczXwZGya6ZjxKaxkdKxzsCMiVSsgEVWxnaWK7ZqbKnzcCd7mUKE9DQaAL2QMXP5AquPeW6W2CWrZ7jNC" - } - ] - } - ], - "image": { - "id": "https://1edtech.edu/logo.png", - "type": "Image", - "caption": "1EdTech University logo" - }, - "email": "registrar@1edtech.edu", - "address": { - "type": [ - "Address" - ], - "addressCountry": "USA", - "addressCountryCode": "US", - "addressRegion": "TX", - "addressLocality": "Austin", - "streetAddress": "123 First St", - "postOfficeBoxNumber": "1", - "postalCode": "12345", - "geo": { - "type": "GeoCoordinates", - "latitude": 1, - "longitude": 1 - } - }, - "otherIdentifier": [ - { - "type": "IdentifierEntry", - "identifier": "12345", - "identifierType": "sourcedId" - }, - { - "type": "IdentifierEntry", - "identifier": "67890", - "identifierType": "nationalIdentityNumber" - } - ], - "official": "Horace Mann", - "parentOrg": { - "id": "did:example:123456789", - "type": [ - "Profile" - ], - "name": "Universal Universities" - } - }, - "creditsAvailable": 36, - "criteria": { - "id": "https://1edtech.edu/achievements/degree", - "narrative": "# Degree Requirements\nStudents must complete..." - }, - "description": "1EdTech University Degree Description", - "endorsement": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://purl.imsglobal.org/spec/ob/v3p0/context.json", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "type": [ - "VerifiableCredential", - "EndorsementCredential" - ], - "issuer": { - "id": "https://accrediter.edu/issuers/565049", - "type": [ - "Profile" - ], - "name": "Example Accrediting Agency" - }, - "name": "Example endorsement", - "issuanceDate": "2010-01-01T00:00:00Z", - "expirationDate": "2020-01-01T00:00:00Z", - "credentialSubject": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "EndorsementSubject" - ], - "endorsementComment": "1EdTech University is in good standing" - }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", - "type": "1EdTechJsonSchemaValidator2019" - }, - { - "id": "https://accrediter.edu/schema/endorsementcredential.json", - "type": "JsonSchemaValidator2018" - } - ], - "credentialStatus": { - "id": "https://1edtech.edu/credentials/3732/revocations", - "type": "1EdTechRevocationList" - }, - "refreshService": { - "id": "http://1edtech.edu/credentials/3732", - "type": "1EdTechCredentialRefresh" - }, - "proof": [ - { - "type": "Ed25519Signature2020", - "created": "2022-05-26T18:17:08Z", - "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", - "proofPurpose": "assertionMethod", - "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" - } - ] - } - ], - "fieldOfStudy": "Research", - "humanCode": "R1", - "image": { - "id": "https://1edtech.edu/achievements/degree/image", - "type": "Image", - "caption": "1EdTech University Degree" - }, - "name": "1EdTech University Degree", - "otherIdentifier": [ - { - "type": "IdentifierEntry", - "identifier": "abde", - "identifierType": "identifier" - } - ], - "resultDescription": [ - { - "id": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", - "type": [ - "ResultDescription" - ], - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "project", - "targetDescription": "Project description", - "targetName": "Final Project", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFItem", - "targetUrl": "https://1edtech.edu/catalog/degree/project" - } - ], - "allowedValue": [ - "D", - "C", - "B", - "A" - ], - "name": "Final Project Grade", - "requiredValue": "C", - "resultType": "LetterGrade" - }, - { - "id": "urn:uuid:a70ddc6a-4c4a-4bd8-8277-cb97c79f40c5", - "type": [ - "ResultDescription" - ], - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "project", - "targetDescription": "Project description", - "targetName": "Final Project", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFItem", - "targetUrl": "https://1edtech.edu/catalog/degree/project" - } - ], - "allowedValue": [ - "D", - "C", - "B", - "A" - ], - "name": "Final Project Grade", - "requiredLevel": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", - "resultType": "RubricCriterionLevel", - "rubricCriterionLevel": [ - { - "id": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", - "type": [ - "RubricCriterionLevel" - ], - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "project", - "targetDescription": "Project description", - "targetName": "Final Project", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFRubricCriterionLevel", - "targetUrl": "https://1edtech.edu/catalog/degree/project/rubric/levels/mastered" - } - ], - "description": "The author demonstrated...", - "level": "Mastered", - "name": "Mastery", - "points": "4" - }, - { - "id": "urn:uuid:6b84b429-31ee-4dac-9d20-e5c55881f80e", - "type": [ - "RubricCriterionLevel" - ], - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "project", - "targetDescription": "Project description", - "targetName": "Final Project", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFRubricCriterionLevel", - "targetUrl": "https://1edtech.edu/catalog/degree/project/rubric/levels/basic" - } - ], - "description": "The author demonstrated...", - "level": "Basic", - "name": "Basic", - "points": "4" - } - ] - }, - { - "id": "urn:uuid:b07c0387-f2d6-4b65-a3f4-f4e4302ea8f7", - "type": [ - "ResultDescription" - ], - "name": "Project Status", - "resultType": "Status" - } - ], - "specialization": "Computer Science Research", - "tag": [ - "research", - "computer science" - ] - }, - "image": { - "id": "https://1edtech.edu/credentials/3732/image", - "type": "Image", - "caption": "1EdTech University Degree for Example Student" - }, - "narrative": "There is a final project report and source code evidence.", - "result": [ - { - "type": [ - "Result" - ], - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "project", - "targetDescription": "Project description", - "targetName": "Final Project", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFItem", - "targetUrl": "https://1edtech.edu/catalog/degree/project/result/1" - } - ], - "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", - "value": "A" - }, - { - "type": [ - "Result" - ], - "achievedLevel": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", - "alignment": [ - { - "type": [ - "Alignment" - ], - "targetCode": "project", - "targetDescription": "Project description", - "targetName": "Final Project", - "targetFramework": "1EdTech University Program and Course Catalog", - "targetType": "CFItem", - "targetUrl": "https://1edtech.edu/catalog/degree/project/result/1" - } - ], - "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c" - }, - { - "type": [ - "Result" - ], - "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", - "status": "Completed" - } - ] - }, - "endorsement": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://purl.imsglobal.org/spec/ob/v3p0/context.json", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "type": [ - "VerifiableCredential", - "EndorsementCredential" - ], - "issuer": { - "id": "https://accrediter.edu/issuers/565049", - "type": [ - "Profile" - ], - "name": "Example Accrediting Agency" - }, - "name": "Example endorsement", - "issuanceDate": "2010-01-01T00:00:00Z", - "expirationDate": "2020-01-01T00:00:00Z", - "credentialSubject": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "EndorsementSubject" - ], - "endorsementComment": "1EdTech University is in good standing" - }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", - "type": "1EdTechJsonSchemaValidator2019" - }, - { - "id": "https://accrediter.edu/schema/endorsementcredential.json", - "type": "JsonSchemaValidator2018" - } - ], - "credentialStatus": { - "id": "https://1edtech.edu/credentials/3732/revocations", - "type": "1EdTechRevocationList" - }, - "refreshService": { - "id": "http://1edtech.edu/credentials/3732", - "type": "1EdTechCredentialRefresh" - }, - "proof": [ - { - "type": "Ed25519Signature2020", - "created": "2022-05-26T18:17:08Z", - "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", - "proofPurpose": "assertionMethod", - "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" - } - ] - } - ], - "evidence": [ - { - "id": "https://1edtech.edu/credentials/3732/evidence/1", - "type": [ - "Evidence" - ], - "narrative": "# Final Project Report \n This project was ...", - "name": "Final Project Report", - "description": "This is the final project report.", - "genre": "Research", - "audience": "Department" - }, - { - "id": "https://github.com/somebody/project", - "type": [ - "Evidence" - ], - "name": "Final Project Code", - "description": "This is the source code for the final project app.", - "genre": "Research", - "audience": "Department" - } - ], - "issuer": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "Profile" - ], - "name": "1EdTech University", - "url": "https://1edtech.edu", - "phone": "1-222-333-4444", - "description": "1EdTech University provides online degree programs.", - "endorsement": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://purl.imsglobal.org/spec/ob/v3p0/context.json", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "type": [ - "VerifiableCredential", - "EndorsementCredential" - ], - "issuer": { - "id": "https://accrediter.edu/issuers/565049", - "type": [ - "Profile" - ], - "name": "Example Accrediting Agency" - }, - "name": "Example endorsement", - "issuanceDate": "2010-01-01T00:00:00Z", - "expirationDate": "2020-01-01T00:00:00Z", - "credentialSubject": { - "id": "https://1edtech.edu/issuers/565049", - "type": [ - "EndorsementSubject" - ], - "endorsementComment": "1EdTech University is in good standing" - }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", - "type": "1EdTechJsonSchemaValidator2019" - }, - { - "id": "https://accrediter.edu/schema/endorsementcredential.json", - "type": "JsonSchemaValidator2018" - } - ], - "credentialStatus": { - "id": "https://1edtech.edu/credentials/3732/revocations", - "type": "1EdTechRevocationList" - }, - "refreshService": { - "id": "http://1edtech.edu/credentials/3732", - "type": "1EdTechCredentialRefresh" - }, - "proof": [ - { - "type": "Ed25519Signature2020", - "created": "2022-05-26T18:17:08Z", - "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", - "proofPurpose": "assertionMethod", - "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" - } - ] - } - ], - "image": { - "id": "https://1edtech.edu/logo.png", - "type": "Image", - "caption": "1EdTech University logo" - }, - "email": "registrar@1edtech.edu", - "address": { - "type": [ - "Address" - ], - "addressCountry": "USA", - "addressCountryCode": "US", - "addressRegion": "TX", - "addressLocality": "Austin", - "streetAddress": "123 First St", - "postOfficeBoxNumber": "1", - "postalCode": "12345", - "geo": { - "type": "GeoCoordinates", - "latitude": 1, - "longitude": 1 - } - }, - "otherIdentifier": [ - { - "type": "IdentifierEntry", - "identifier": "12345", - "identifierType": "sourcedId" - }, - { - "type": "IdentifierEntry", - "identifier": "67890", - "identifierType": "nationalIdentityNumber" - } - ], - "official": "Horace Mann", - "parentOrg": { - "id": "did:example:123456789", - "type": [ - "Profile" - ], - "name": "Universal Universities" - } - }, - "issuanceDate": "2010-01-01T00:00:00Z", - "expirationDate": "2020-01-01T00:00:00Z", - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/achievementcredential.json", - "type": "1EdTechJsonSchemaValidator2019" - } - ], - "credentialStatus": { - "id": "https://1edtech.edu/credentials/3732/revocations", - "type": "1EdTechRevocationList" - }, - "refreshService": { - "id": "http://1edtech.edu/credentials/3732", - "type": "1EdTechCredentialRefresh" - }, - "proof": [ - { - "type": "Ed25519Signature2020", - "created": "2022-06-09T22:56:28Z", - "verificationMethod": "https://1edtech.edu/issuers/565049#key-1", - "proofPurpose": "assertionMethod", - "proofValue": "zPpg92pBBEqRMxAqHMFQJ6Kmwf1thF9GdzqCofyWTLE6AhuahQixBNuG9BLgk6vb8K3NoqzanajYYYJbEcEhvQtM" - } - ] -} \ No newline at end of file +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json", + "https://purl.imsglobal.org/spec/ob/v3p0/extensions.json" + ], + "id": "http://1edtech.edu/credentials/3732", + "type": [ + "VerifiableCredential", + "OpenBadgeCredential" + ], + "name": "1EdTech University Degree for Example Student", + "description": "1EdTech University Degree Description", + "image": { + "id": "https://1edtech.edu/credentials/3732/image", + "type": "Image", + "caption": "1EdTech University Degree for Example Student" + }, + "credentialSubject": { + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "type": [ + "AchievementSubject" + ], + "activityEndDate": "2010-01-02T00:00:00Z", + "activityStartDate": "2010-01-01T00:00:00Z", + "creditsEarned": 42, + "licenseNumber": "A-9320041", + "role": "Major Domo", + "source": { + "id": "https://school.edu/issuers/201234", + "type": [ + "Profile" + ], + "name": "1EdTech College of Arts" + }, + "term": "Fall", + "identifier": [ + { + "type": "IdentityObject", + "identityHash": "student@1edtech.edu", + "identityType": "emailAddress", + "hashed": false, + "salt": "not-used" + }, + { + "type": "IdentityObject", + "identityHash": "somebody@gmail.com", + "identityType": "emailAddress", + "hashed": false, + "salt": "not-used" + } + ], + "achievement": { + "id": "https://1edtech.edu/achievements/degree", + "type": [ + "Achievement" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "degree", + "targetDescription": "1EdTech University Degree programs.", + "targetName": "1EdTech University Degree", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree" + }, + { + "type": [ + "Alignment" + ], + "targetCode": "degree", + "targetDescription": "1EdTech University Degree programs.", + "targetName": "1EdTech University Degree", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CTDL", + "targetUrl": "https://credentialengineregistry.org/resources/ce-98cb027b-95ef-4494-908d-6f7790ec6b6b" + } + ], + "achievementType": "Degree", + "creator": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "1EdTech University", + "url": "https://1edtech.edu", + "phone": "1-222-333-4444", + "description": "1EdTech University provides online degree programs.", + "endorsement": [ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" + ], + "id": "http://1edtech.edu/endorsementcredential/3732", + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "name": "SDE endorsement", + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "validFrom": "2010-01-01T00:00:00Z", + "validUntil": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_endorsementcredential_schema.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-rdf-2022", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + }, + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" + ], + "id": "http://1edtech.edu/endorsementcredential/3733", + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "name": "SDE endorsement", + "issuer": { + "id": "https://state.gov/issuers/565049", + "type": [ + "Profile" + ], + "name": "State Department of Education" + }, + "validFrom": "2010-01-01T00:00:00Z", + "validUntil": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_endorsementcredential_schema.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://state.gov/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://state.gov/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://state.gov/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-rdf-2022", + "created": "2022-05-26T18:25:59Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#z5bDnmSgDczXwZGya6ZjxKaxkdKxzsCMiVSsgEVWxnaWK7ZqbKnzcCd7mUKE9DQaAL2QMXP5AquPeW6W2CWrZ7jNC", + "proofPurpose": "assertionMethod", + "proofValue": "z5bDnmSgDczXwZGya6ZjxKaxkdKxzsCMiVSsgEVWxnaWK7ZqbKnzcCd7mUKE9DQaAL2QMXP5AquPeW6W2CWrZ7jNC" + } + ] + } + ], + "image": { + "id": "https://1edtech.edu/logo.png", + "type": "Image", + "caption": "1EdTech University logo" + }, + "email": "registrar@1edtech.edu", + "address": { + "type": [ + "Address" + ], + "addressCountry": "USA", + "addressCountryCode": "US", + "addressRegion": "TX", + "addressLocality": "Austin", + "streetAddress": "123 First St", + "postOfficeBoxNumber": "1", + "postalCode": "12345", + "geo": { + "type": "GeoCoordinates", + "latitude": 1, + "longitude": 1 + } + }, + "otherIdentifier": [ + { + "type": "IdentifierEntry", + "identifier": "12345", + "identifierType": "sourcedId" + }, + { + "type": "IdentifierEntry", + "identifier": "67890", + "identifierType": "nationalIdentityNumber" + } + ], + "official": "Horace Mann", + "parentOrg": { + "id": "did:example:123456789", + "type": [ + "Profile" + ], + "name": "Universal Universities" + } + }, + "creditsAvailable": 36, + "criteria": { + "id": "https://1edtech.edu/achievements/degree", + "narrative": "# Degree Requirements\nStudents must complete..." + }, + "description": "1EdTech University Degree Description", + "endorsement": [ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" + ], + "id": "http://1edtech.edu/endorsementcredential/3734", + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "name": "EAA endorsement", + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "validFrom": "2010-01-01T00:00:00Z", + "validUntil": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_endorsementcredential_schema.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-rdf-2022", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + } + ], + "fieldOfStudy": "Research", + "humanCode": "R1", + "image": { + "id": "https://1edtech.edu/achievements/degree/image", + "type": "Image", + "caption": "1EdTech University Degree" + }, + "name": "1EdTech University Degree", + "otherIdentifier": [ + { + "type": "IdentifierEntry", + "identifier": "abde", + "identifierType": "identifier" + } + ], + "resultDescription": [ + { + "id": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", + "type": [ + "ResultDescription" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project" + } + ], + "allowedValue": [ + "D", + "C", + "B", + "A" + ], + "name": "Final Project Grade", + "requiredValue": "C", + "resultType": "LetterGrade" + }, + { + "id": "urn:uuid:a70ddc6a-4c4a-4bd8-8277-cb97c79f40c5", + "type": [ + "ResultDescription" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project" + } + ], + "allowedValue": [ + "D", + "C", + "B", + "A" + ], + "name": "Final Project Grade", + "requiredLevel": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", + "resultType": "RubricCriterionLevel", + "rubricCriterionLevel": [ + { + "id": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", + "type": [ + "RubricCriterionLevel" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFRubricCriterionLevel", + "targetUrl": "https://1edtech.edu/catalog/degree/project/rubric/levels/mastered" + } + ], + "description": "The author demonstrated...", + "level": "Mastered", + "name": "Mastery", + "points": "4" + }, + { + "id": "urn:uuid:6b84b429-31ee-4dac-9d20-e5c55881f80e", + "type": [ + "RubricCriterionLevel" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFRubricCriterionLevel", + "targetUrl": "https://1edtech.edu/catalog/degree/project/rubric/levels/basic" + } + ], + "description": "The author demonstrated...", + "level": "Basic", + "name": "Basic", + "points": "4" + } + ] + }, + { + "id": "urn:uuid:b07c0387-f2d6-4b65-a3f4-f4e4302ea8f7", + "type": [ + "ResultDescription" + ], + "name": "Project Status", + "resultType": "Status" + } + ], + "specialization": "Computer Science Research", + "tag": [ + "research", + "computer science" + ] + }, + "image": { + "id": "https://1edtech.edu/credentials/3732/image", + "type": "Image", + "caption": "1EdTech University Degree for Example Student" + }, + "narrative": "There is a final project report and source code evidence.", + "result": [ + { + "type": [ + "Result" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project/result/1" + } + ], + "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", + "value": "A" + }, + { + "type": [ + "Result" + ], + "achievedLevel": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project/result/1" + } + ], + "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c" + }, + { + "type": [ + "Result" + ], + "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", + "status": "Completed" + } + ] + }, + "endorsement": [ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" + ], + "id": "http://1edtech.edu/endorsementcredential/3735", + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "name": "EAA endorsement", + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "validFrom": "2010-01-01T00:00:00Z", + "validUntil": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_endorsementcredential_schema.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-rdf-2022", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + } + ], + "evidence": [ + { + "id": "https://1edtech.edu/credentials/3732/evidence/1", + "type": [ + "Evidence" + ], + "narrative": "# Final Project Report \n This project was ...", + "name": "Final Project Report", + "description": "This is the final project report.", + "genre": "Research", + "audience": "Department" + }, + { + "id": "https://github.com/somebody/project", + "type": [ + "Evidence" + ], + "name": "Final Project Code", + "description": "This is the source code for the final project app.", + "genre": "Research", + "audience": "Department" + } + ], + "issuer": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "1EdTech University", + "url": "https://1edtech.edu", + "phone": "1-222-333-4444", + "description": "1EdTech University provides online degree programs.", + "endorsement": [ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" + ], + "id": "http://1edtech.edu/endorsementcredential/3736", + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "name": "EAA endorsement", + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "validFrom": "2010-01-01T00:00:00Z", + "validUntil": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_endorsementcredential_schema.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-rdf-2022", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + } + ], + "image": { + "id": "https://1edtech.edu/logo.png", + "type": "Image", + "caption": "1EdTech University logo" + }, + "email": "registrar@1edtech.edu", + "address": { + "type": [ + "Address" + ], + "addressCountry": "USA", + "addressCountryCode": "US", + "addressRegion": "TX", + "addressLocality": "Austin", + "streetAddress": "123 First St", + "postOfficeBoxNumber": "1", + "postalCode": "12345", + "geo": { + "type": "GeoCoordinates", + "latitude": 1, + "longitude": 1 + } + }, + "otherIdentifier": [ + { + "type": "IdentifierEntry", + "identifier": "12345", + "identifierType": "sourcedId" + }, + { + "type": "IdentifierEntry", + "identifier": "67890", + "identifierType": "nationalIdentityNumber" + } + ], + "official": "Horace Mann", + "parentOrg": { + "id": "did:example:123456789", + "type": [ + "Profile" + ], + "name": "Universal Universities" + } + }, + "validFrom": "2010-01-01T00:00:00Z", + "validUntil": "2030-01-01T00:00:00Z", + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "DataIntegrityProof", + "created": "2024-04-03T09:44:42Z", + "verificationMethod": "https://1edtech.edu/issuers/565049#z6Mknyb2Gb4NxzW3xSr9ChTtdQZ1zs77piQ3r9SaJ9vMzmrs", + "cryptosuite": "eddsa-rdfc-2022", + "proofPurpose": "assertionMethod", + "proofValue": "z2ytgyoSERUFeduofGBF73kuFbDrJdTfwZAtvDvffXqL8VfSXyJkkZHFUdZENCr4a2fR1mQbkX2b8whUPhwgkY5qk" + } + ] + } \ No newline at end of file diff --git a/inspector-vc/src/test/resources/ob30/complete_v1.json b/inspector-vc/src/test/resources/ob30/complete_v1.json new file mode 100644 index 0000000..ac26bae --- /dev/null +++ b/inspector-vc/src/test/resources/ob30/complete_v1.json @@ -0,0 +1,716 @@ +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "id": "http://1edtech.edu/credentials/3732", + "type": [ + "VerifiableCredential", + "OpenBadgeCredential" + ], + "name": "1EdTech University Degree for Example Student", + "description": "1EdTech University Degree Description", + "image": { + "id": "https://1edtech.edu/credentials/3732/image", + "type": "Image", + "caption": "1EdTech University Degree for Example Student" + }, + "credentialSubject": { + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "type": [ + "AchievementSubject" + ], + "activityEndDate": "2010-01-02T00:00:00Z", + "activityStartDate": "2010-01-01T00:00:00Z", + "creditsEarned": 42, + "licenseNumber": "A-9320041", + "role": "Major Domo", + "source": { + "id": "https://school.edu/issuers/201234", + "type": [ + "Profile" + ], + "name": "1EdTech College of Arts" + }, + "term": "Fall", + "identifier": [ + { + "type": "IdentityObject", + "identityHash": "student@1edtech.edu", + "identityType": "email", + "hashed": false, + "salt": "not-used" + }, + { + "type": "IdentityObject", + "identityHash": "somebody@gmail.com", + "identityType": "email", + "hashed": false, + "salt": "not-used" + } + ], + "achievement": { + "id": "https://1edtech.edu/achievements/degree", + "type": [ + "Achievement" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "degree", + "targetDescription": "1EdTech University Degree programs.", + "targetName": "1EdTech University Degree", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree" + }, + { + "type": [ + "Alignment" + ], + "targetCode": "degree", + "targetDescription": "1EdTech University Degree programs.", + "targetName": "1EdTech University Degree", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CTDL", + "targetUrl": "https://credentialengineregistry.org/resources/ce-98cb027b-95ef-4494-908d-6f7790ec6b6b" + } + ], + "achievementType": "Degree", + "creator": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "1EdTech University", + "url": "https://1edtech.edu", + "phone": "1-222-333-4444", + "description": "1EdTech University provides online degree programs.", + "endorsement": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "name": "Example endorsement", + "issuanceDate": "2010-01-01T00:00:00Z", + "expirationDate": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "JsonSchemaValidator2018" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "Ed25519Signature2020", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + }, + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "issuer": { + "id": "https://state.gov/issuers/565049", + "type": [ + "Profile" + ], + "name": "State Department of Education" + }, + "issuanceDate": "2010-01-01T00:00:00Z", + "expirationDate": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://state.gov/schema/endorsementcredential.json", + "type": "JsonSchemaValidator2018" + } + ], + "credentialStatus": { + "id": "https://state.gov/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://state.gov/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "Ed25519Signature2020", + "created": "2022-05-26T18:25:59Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", + "proofPurpose": "assertionMethod", + "proofValue": "z5bDnmSgDczXwZGya6ZjxKaxkdKxzsCMiVSsgEVWxnaWK7ZqbKnzcCd7mUKE9DQaAL2QMXP5AquPeW6W2CWrZ7jNC" + } + ] + } + ], + "image": { + "id": "https://1edtech.edu/logo.png", + "type": "Image", + "caption": "1EdTech University logo" + }, + "email": "registrar@1edtech.edu", + "address": { + "type": [ + "Address" + ], + "addressCountry": "USA", + "addressCountryCode": "US", + "addressRegion": "TX", + "addressLocality": "Austin", + "streetAddress": "123 First St", + "postOfficeBoxNumber": "1", + "postalCode": "12345", + "geo": { + "type": "GeoCoordinates", + "latitude": 1, + "longitude": 1 + } + }, + "otherIdentifier": [ + { + "type": "IdentifierEntry", + "identifier": "12345", + "identifierType": "sourcedId" + }, + { + "type": "IdentifierEntry", + "identifier": "67890", + "identifierType": "nationalIdentityNumber" + } + ], + "official": "Horace Mann", + "parentOrg": { + "id": "did:example:123456789", + "type": [ + "Profile" + ], + "name": "Universal Universities" + } + }, + "creditsAvailable": 36, + "criteria": { + "id": "https://1edtech.edu/achievements/degree", + "narrative": "# Degree Requirements\nStudents must complete..." + }, + "description": "1EdTech University Degree Description", + "endorsement": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "name": "Example endorsement", + "issuanceDate": "2010-01-01T00:00:00Z", + "expirationDate": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "JsonSchemaValidator2018" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "Ed25519Signature2020", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + } + ], + "fieldOfStudy": "Research", + "humanCode": "R1", + "image": { + "id": "https://1edtech.edu/achievements/degree/image", + "type": "Image", + "caption": "1EdTech University Degree" + }, + "name": "1EdTech University Degree", + "otherIdentifier": [ + { + "type": "IdentifierEntry", + "identifier": "abde", + "identifierType": "identifier" + } + ], + "resultDescription": [ + { + "id": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", + "type": [ + "ResultDescription" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project" + } + ], + "allowedValue": [ + "D", + "C", + "B", + "A" + ], + "name": "Final Project Grade", + "requiredValue": "C", + "resultType": "LetterGrade" + }, + { + "id": "urn:uuid:a70ddc6a-4c4a-4bd8-8277-cb97c79f40c5", + "type": [ + "ResultDescription" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project" + } + ], + "allowedValue": [ + "D", + "C", + "B", + "A" + ], + "name": "Final Project Grade", + "requiredLevel": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", + "resultType": "RubricCriterionLevel", + "rubricCriterionLevel": [ + { + "id": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", + "type": [ + "RubricCriterionLevel" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFRubricCriterionLevel", + "targetUrl": "https://1edtech.edu/catalog/degree/project/rubric/levels/mastered" + } + ], + "description": "The author demonstrated...", + "level": "Mastered", + "name": "Mastery", + "points": "4" + }, + { + "id": "urn:uuid:6b84b429-31ee-4dac-9d20-e5c55881f80e", + "type": [ + "RubricCriterionLevel" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFRubricCriterionLevel", + "targetUrl": "https://1edtech.edu/catalog/degree/project/rubric/levels/basic" + } + ], + "description": "The author demonstrated...", + "level": "Basic", + "name": "Basic", + "points": "4" + } + ] + }, + { + "id": "urn:uuid:b07c0387-f2d6-4b65-a3f4-f4e4302ea8f7", + "type": [ + "ResultDescription" + ], + "name": "Project Status", + "resultType": "Status" + } + ], + "specialization": "Computer Science Research", + "tag": [ + "research", + "computer science" + ] + }, + "image": { + "id": "https://1edtech.edu/credentials/3732/image", + "type": "Image", + "caption": "1EdTech University Degree for Example Student" + }, + "narrative": "There is a final project report and source code evidence.", + "result": [ + { + "type": [ + "Result" + ], + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project/result/1" + } + ], + "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", + "value": "A" + }, + { + "type": [ + "Result" + ], + "achievedLevel": "urn:uuid:d05a0867-d0ad-4b03-bdb5-28fb5d2aab7a", + "alignment": [ + { + "type": [ + "Alignment" + ], + "targetCode": "project", + "targetDescription": "Project description", + "targetName": "Final Project", + "targetFramework": "1EdTech University Program and Course Catalog", + "targetType": "CFItem", + "targetUrl": "https://1edtech.edu/catalog/degree/project/result/1" + } + ], + "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c" + }, + { + "type": [ + "Result" + ], + "resultDescription": "urn:uuid:f6ab24cd-86e8-4eaf-b8c6-ded74e8fd41c", + "status": "Completed" + } + ] + }, + "endorsement": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "name": "Example endorsement", + "issuanceDate": "2010-01-01T00:00:00Z", + "expirationDate": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "JsonSchemaValidator2018" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "Ed25519Signature2020", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + } + ], + "evidence": [ + { + "id": "https://1edtech.edu/credentials/3732/evidence/1", + "type": [ + "Evidence" + ], + "narrative": "# Final Project Report \n This project was ...", + "name": "Final Project Report", + "description": "This is the final project report.", + "genre": "Research", + "audience": "Department" + }, + { + "id": "https://github.com/somebody/project", + "type": [ + "Evidence" + ], + "name": "Final Project Code", + "description": "This is the source code for the final project app.", + "genre": "Research", + "audience": "Department" + } + ], + "issuer": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "1EdTech University", + "url": "https://1edtech.edu", + "phone": "1-222-333-4444", + "description": "1EdTech University provides online degree programs.", + "endorsement": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential", + "EndorsementCredential" + ], + "issuer": { + "id": "https://accrediter.edu/issuers/565049", + "type": [ + "Profile" + ], + "name": "Example Accrediting Agency" + }, + "name": "Example endorsement", + "issuanceDate": "2010-01-01T00:00:00Z", + "expirationDate": "2020-01-01T00:00:00Z", + "credentialSubject": { + "id": "https://1edtech.edu/issuers/565049", + "type": [ + "EndorsementSubject" + ], + "endorsementComment": "1EdTech University is in good standing" + }, + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/endorsementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + }, + { + "id": "https://accrediter.edu/schema/endorsementcredential.json", + "type": "JsonSchemaValidator2018" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "Ed25519Signature2020", + "created": "2022-05-26T18:17:08Z", + "verificationMethod": "https://accrediter.edu/issuers/565049#key-1", + "proofPurpose": "assertionMethod", + "proofValue": "zvPkQiUFfJrgnCRhyPkTSkgrGXbnLR15pHH5HZVYNdM4TCAwQHqG7fMeMPLtYNRnEgoV1aJdR5E61eWu5sWRYgtA" + } + ] + } + ], + "image": { + "id": "https://1edtech.edu/logo.png", + "type": "Image", + "caption": "1EdTech University logo" + }, + "email": "registrar@1edtech.edu", + "address": { + "type": [ + "Address" + ], + "addressCountry": "USA", + "addressCountryCode": "US", + "addressRegion": "TX", + "addressLocality": "Austin", + "streetAddress": "123 First St", + "postOfficeBoxNumber": "1", + "postalCode": "12345", + "geo": { + "type": "GeoCoordinates", + "latitude": 1, + "longitude": 1 + } + }, + "otherIdentifier": [ + { + "type": "IdentifierEntry", + "identifier": "12345", + "identifierType": "sourcedId" + }, + { + "type": "IdentifierEntry", + "identifier": "67890", + "identifierType": "nationalIdentityNumber" + } + ], + "official": "Horace Mann", + "parentOrg": { + "id": "did:example:123456789", + "type": [ + "Profile" + ], + "name": "Universal Universities" + } + }, + "issuanceDate": "2010-01-01T00:00:00Z", + "expirationDate": "2020-01-01T00:00:00Z", + "credentialSchema": [ + { + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/achievementcredential.json", + "type": "1EdTechJsonSchemaValidator2019" + } + ], + "credentialStatus": { + "id": "https://1edtech.edu/credentials/3732/revocations", + "type": "1EdTechRevocationList" + }, + "refreshService": { + "id": "http://1edtech.edu/credentials/3732", + "type": "1EdTechCredentialRefresh" + }, + "proof": [ + { + "type": "Ed25519Signature2020", + "created": "2022-06-09T22:56:28Z", + "verificationMethod": "https://1edtech.edu/issuers/565049#key-1", + "proofPurpose": "assertionMethod", + "proofValue": "zPpg92pBBEqRMxAqHMFQJ6Kmwf1thF9GdzqCofyWTLE6AhuahQixBNuG9BLgk6vb8K3NoqzanajYYYJbEcEhvQtM" + } + ] +} \ No newline at end of file diff --git a/inspector-vc/src/test/resources/ob30/simple.1ob b/inspector-vc/src/test/resources/ob30/simple.1ob new file mode 100644 index 0000000..c0776c4 --- /dev/null +++ b/inspector-vc/src/test/resources/ob30/simple.1ob @@ -0,0 +1,45 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" + ], + "id": "http://example.com/credentials/3527", + "type": [ + "VerifiableCredential", + "OpenBadgeCredential" + ], + "issuer": { + "id": "https://example.com/issuers/876543", + "type": [ + "Profile" + ], + "name": "Example Corp" + }, + "validFrom": "2010-01-01T00:00:00Z", + "name": "Teamwork Badge", + "credentialSubject": { + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "type": [ + "AchievementSubject" + ], + "achievement": { + "id": "https://example.com/achievements/21st-century-skills/teamwork", + "type": [ + "Achievement" + ], + "criteria": { + "narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management." + }, + "description": "This badge recognizes the development of the capacity to collaborate within a group environment.", + "name": "Teamwork" + } + }, + "proof": [{ + "type": "DataIntegrityProof", + "created": "2010-01-01T19:23:24Z", + "verificationMethod": "https://example.com/issuers/876543#z6MkjZRZv3aez3r18pB1RBFJR1kwUVJ5jHt92JmQwXbd5hwi", + "cryptosuite": "eddsa-rdfc-2022", + "proofPurpose": "assertionMethod", + "proofValue": "z41ZsNkz78FHSGkAD5J4b8EN49DkywMMJSL3UdUNffbsCAWmTLPvtnJpd3JGGooYX7TNrzgsTLkXUWiGsRRZ788ML" + }] +} \ No newline at end of file