From 90186ad63a6ce2b6aaf24460ffc56b7c8561392d Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 10 Nov 2022 11:42:25 -0800 Subject: [PATCH 1/5] Update cached ob-v3p0.context --- .../src/main/resources/contexts/ob-v3p0.json | 220 +++++++++--------- 1 file changed, 110 insertions(+), 110 deletions(-) diff --git a/inspector-vc/src/main/resources/contexts/ob-v3p0.json b/inspector-vc/src/main/resources/contexts/ob-v3p0.json index 8e133c8..7e4d9e2 100644 --- a/inspector-vc/src/main/resources/contexts/ob-v3p0.json +++ b/inspector-vc/src/main/resources/contexts/ob-v3p0.json @@ -6,65 +6,65 @@ "xsd": "https://www.w3.org/2001/XMLSchema#", "OpenBadgeCredential": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#OpenBadgeCredential" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#OpenBadgeCredential" }, "Achievement": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Achievement", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Achievement", "@context": { "achievementType": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#achievementType", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#achievementType", "@type": "xsd:string" }, "alignment": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#alignment", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Alignment", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#alignment", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Alignment", "@container": "@set" }, "creator": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Profile" }, "creditsAvailable": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#creditsAvailable", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#creditsAvailable", "@type": "xsd:float" }, "criteria": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Criteria", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Criteria", "@type": "@id" }, "fieldOfStudy": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#fieldOfStudy", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#fieldOfStudy", "@type": "xsd:string" }, "humanCode": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#humanCode", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#humanCode", "@type": "xsd:string" }, "otherIdentifier": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#otherIdentifier", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#otherIdentifier", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentifierEntry", "@container": "@set" }, "related": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#related", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Related", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#related", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Related", "@container": "@set" }, "resultDescription": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#resultDescription", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#ResultDescription", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#resultDescription", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#ResultDescription", "@container": "@set" }, "specialization": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#specialization", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#specialization", "@type": "xsd:string" }, "tag": { - "@id": "https://schema.org/keywords", - "@type": "xsd:string", + "@id": "https://schema.org/keywords", + "@type": "xsd:string", "@container": "@set" }, "version": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#version", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#version", "@type": "xsd:string" } } @@ -73,83 +73,83 @@ "@id": "OpenBadgeCredential" }, "AchievementSubject": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#AchievementSubject", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#AchievementSubject", "@context": { "achievement": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Achievement" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Achievement" }, "activityEndDate": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#activityEndDate", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#activityEndDate", "@type": "xsd:date" }, "activityStartDate": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#activityStartDate", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#activityStartDate", "@type": "xsd:date" }, "creditsEarned": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#creditsEarned", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#creditsEarned", "@type": "xsd:float" }, "identifier": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifier", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentityObject", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#identifier", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentityObject", "@container": "@set" }, "licenseNumber": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#licenseNumber", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#licenseNumber", "@type": "xsd:string" }, "result": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#result", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Result", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#result", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Result", "@container": "@set" }, "role": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#role", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#role", "@type": "xsd:string" }, "source": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#source", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#source", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Profile" }, "term": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#term", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#term", "@type": "xsd:string" } } }, "Address": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Address", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address", "@context": { "addressCountry": { - "@id": "https://schema.org/addressCountry", + "@id": "https://schema.org/addressCountry", "@type": "xsd:string" }, "addressCountryCode": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#CountryCode", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#CountryCode", "@type": "xsd:string" }, "addressLocality": { - "@id": "https://schema.org/addressLocality", + "@id": "https://schema.org/addressLocality", "@type": "xsd:string" }, "addressRegion": { - "@id": "https://schema.org/addressRegion", + "@id": "https://schema.org/addressRegion", "@type": "xsd:string" }, "geo": { - "@id" : "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#GeoCoordinates" + "@id" : "https://purl.imsglobal.org/spec/vc/ob/vocab.html#GeoCoordinates" }, "postOfficeBoxNumber": { - "@id": "https://schema.org/postOfficeBoxNumber", + "@id": "https://schema.org/postOfficeBoxNumber", "@type": "xsd:string" }, "postalCode": { - "@id": "https://schema.org/postalCode", + "@id": "https://schema.org/postalCode", "@type": "xsd:string" }, "streetAddress": { - "@id": "https://schema.org/streetAddress", + "@id": "https://schema.org/streetAddress", "@type": "xsd:string" } } @@ -158,25 +158,25 @@ "@id": "https://schema.org/Alignment", "@context": { "targetCode": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#targetCode", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#targetCode", "@type": "xsd:string" }, "targetDescription": { - "@id": "https://schema.org/targetDescription", + "@id": "https://schema.org/targetDescription", "@type": "xsd:string" }, "targetFramework": { - "@id": "https://schema.org/targetFramework", + "@id": "https://schema.org/targetFramework", "@type": "xsd:string" }, "targetName": { - "@id": "https://schema.org/targetName", + "@id": "https://schema.org/targetName", "@type": "xsd:string" - }, + }, "targetType": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#targetType", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#targetType", "@type": "xsd:string" - }, + }, "targetUrl": { "@id": "https://schema.org/targetUrl", "@type": "xsd:anyURI" @@ -184,25 +184,25 @@ } }, "Criteria": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Criteria" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Criteria" }, "EndorsementCredential": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementCredential" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#EndorsementCredential" }, "EndorsementSubject": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementSubject", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#EndorsementSubject", "@context": { "endorsementComment": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#endorsementComment", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#endorsementComment", "@type": "xsd:string" } } }, "Evidence": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Evidence", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Evidence", "@context": { "audience": { - "@id": "https://schema.org/audience", + "@id": "https://schema.org/audience", "@type": "xsd:string" }, "genre": { @@ -212,54 +212,54 @@ } }, "GeoCoordinates": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#GeoCoordinates", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#GeoCoordinates", "@context": { "latitude": { - "@id": "https://schema.org/latitude", + "@id": "https://schema.org/latitude", "@type": "xsd:string" }, "longitude": { - "@id": "https://schema.org/longitude", + "@id": "https://schema.org/longitude", "@type": "xsd:string" } } }, "IdentifierEntry": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentifierEntry", "@context": { "identifier": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifier", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#identifier", "@type": "xsd:string" }, "identifierType": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifierType", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#identifierType", "@type": "xsd:string" } } }, "IdentityObject": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentityObject", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentityObject", "@context": { "hashed": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#hashed", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#hashed", "@type": "xsd:boolean" }, "identityHash": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identityHash", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#identityHash", "@type": "xsd:string" }, "identityType": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identityType", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#identityType", "@type": "xsd:string" }, "salt": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#salt", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#salt", "@type": "xsd:string" } } }, "Image": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Image", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Image", "@context": { "caption": { "@id": "https://schema.org/caption", @@ -268,21 +268,21 @@ } }, "Profile": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Profile", "@context": { "additionalName": { "@id": "https://schema.org/additionalName", "@type": "xsd:string" }, "address": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Address" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address" }, "dateOfBirth": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#dateOfBirth", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#dateOfBirth", "@type": "xsd:date" }, "email": { - "@id": "https://schema.org/email", + "@id": "https://schema.org/email", "@type": "xsd:string" }, "familyName": { @@ -290,7 +290,7 @@ "@type": "xsd:string" }, "familyNamePrefix": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#familyNamePrefix", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#familyNamePrefix", "@type": "xsd:string" }, "givenName": { @@ -306,134 +306,134 @@ "@type": "xsd:string" }, "otherIdentifier": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#otherIdentifier", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#otherIdentifier", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentifierEntry", "@container": "@set" }, "parentOrg": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#parentOrg", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#parentOrg", "@type": "xsd:string" }, "patronymicName": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#patronymicName", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#patronymicName", "@type": "xsd:string" }, "phone": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#PhoneNumber", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#PhoneNumber", "@type": "xsd:string" }, "official": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#official", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#official", "@type": "xsd:string" } } }, "Related": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Related", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Related", "@context": { "version": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#version", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#version", "@type": "xsd:string" } } }, "Result": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Result", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Result", "@context": { "achievedLevel": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#achievedLevel", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#achievedLevel", "@type": "xsd:anyURI" }, "resultDescription": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#resultDescription", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#resultDescription", "@type": "xsd:anyURI" }, "status": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#status", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#status", "@type": "xsd:string" }, "value": { - "@id": "https://schema.org/value", + "@id": "https://schema.org/value", "@type": "xsd:string" } } }, "ResultDescription": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#ResultDescription", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#ResultDescription", "@context": { "allowedValue": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#allowedValue", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#allowedValue", "@type": "xsd:string", "@container": "@set" }, "requiredLevel": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#requiredLevel", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#requiredLevel", "@type": "xsd:anyURI" }, "requiredValue": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#requiredValue", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#requiredValue", "@type": "xsd:string" }, "resultType": { - "@id":"https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#resultType", + "@id":"https://purl.imsglobal.org/spec/vc/ob/vocab.html#resultType", "@type": "xsd:string" }, "rubricCriterionLevel": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#rubricCriterionLevel", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#RubricCriterionLevel", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#rubricCriterionLevel", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#RubricCriterionLevel", "@container": "@set" }, "valueMax": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#valueMax", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#valueMax", "@type": "xsd:string" }, "valueMin": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#valueMin", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#valueMin", "@type": "xsd:string" - } + } } }, "RubricCriterionLevel": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#RubricCriterionLevel", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#RubricCriterionLevel", "@context": { "level": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#level", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#level", "@type": "xsd:string" }, "points": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#points", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#points", "@type": "xsd:string" } } }, "alignment": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#alignment", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Alignment", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#alignment", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Alignment", "@container": "@set" - }, + }, "description": { - "@id": "https://schema.org/description", + "@id": "https://schema.org/description", "@type": "xsd:string" }, "endorsement": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#endorsement", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementCredential", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#endorsement", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#EndorsementCredential", "@container": "@set" }, "image": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#image", - "@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Image" + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#image", + "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Image" }, "name": { - "@id": "https://schema.org/name", + "@id": "https://schema.org/name", "@type": "xsd:string" }, "narrative": { - "@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#narrative", + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#narrative", "@type": "xsd:string" }, "url": { - "@id": "https://schema.org/url", + "@id": "https://schema.org/url", "@type": "xsd:anyURI" } } From e813369036a320cfca44350dfe8a22c6de6394b9 Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 10 Nov 2022 11:43:11 -0800 Subject: [PATCH 2/5] Add cached ob-v3p0-extensions context --- .../oneedtech/inspect/vc/util/CachingDocumentLoader.java | 3 ++- .../src/main/resources/contexts/ob-v3p0-extensions.json | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 inspector-vc/src/main/resources/contexts/ob-v3p0-extensions.json diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java index b656419..66b97fe 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java @@ -41,7 +41,8 @@ public class CachingDocumentLoader implements DocumentLoader { static final ImmutableMap bundled = ImmutableMap.builder() .put("https://purl.imsglobal.org/spec/clr/v2p0/context.json",Resources.getResource("contexts/clr-v2p0.json")) - .put("https://purl.imsglobal.org/spec/ob/v3p0/context.json",Resources.getResource("contexts/ob-v3p0.json")) + .put("https://purl.imsglobal.org/spec/ob/v3p0/context.json",Resources.getResource("contexts/ob-v3p0.json")) + .put("https://purl.imsglobal.org/spec/ob/v3p0/extensions.json",Resources.getResource("contexts/ob-v3p0-extensions.json")) .put("https://imsglobal.github.io/openbadges-specification/context.json",Resources.getResource("contexts/obv3x.jsonld")) .put("https://www.w3.org/ns/did/v1", Resources.getResource("contexts/did-v1.jsonld")) .put("https://www.w3.org/ns/odrl.jsonld", Resources.getResource("contexts/odrl.jsonld")) diff --git a/inspector-vc/src/main/resources/contexts/ob-v3p0-extensions.json b/inspector-vc/src/main/resources/contexts/ob-v3p0-extensions.json new file mode 100644 index 0000000..95dc35c --- /dev/null +++ b/inspector-vc/src/main/resources/contexts/ob-v3p0-extensions.json @@ -0,0 +1,9 @@ +{ + "@context": { + "id": "@id", + "type": "@type", + "1EdTechJsonSchemaValidator2019": "https://purl.imsglobal.org/spec/vccs/v1p0/context.json#1EdTechJsonSchemaValidator2019", + "1EdTechRevocationList": "https://purl.imsglobal.org/spec/vcrl/v1p0/context.json#1EdTechRevocationList", + "1EdTechCredentialRefresh": "https://purl.imsglobal.org/spec/vccr/v1p0/context.json#1EdTechCredentialRefresh" + } +} \ No newline at end of file From 26bf98d0468e24cbee95ec85780ba7f9c500ff32 Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 10 Nov 2022 11:53:55 -0800 Subject: [PATCH 3/5] Update simple examples --- .../src/test/resources/ob30/simple-json.png | Bin 84440 -> 84080 bytes .../src/test/resources/ob30/simple-json.svg | 39 ++++++++---------- .../src/test/resources/ob30/simple.json | 37 +++++++---------- 3 files changed, 33 insertions(+), 43 deletions(-) diff --git a/inspector-vc/src/test/resources/ob30/simple-json.png b/inspector-vc/src/test/resources/ob30/simple-json.png index ee80f0abe5cd18f2f1bd5ea03294aac9c481500d..f1b1f70c634d666b2c7f404ca473aea7cf38928f 100644 GIT binary patch delta 697 zcma)2F>ljA80C<%lmW4X1teo3SU7ZN-`Qs`RT3wprY=d8RBa_B&h{mCo7jnCM@^-u z2&p>~gMR=!6A~=^23Qb`>@55Q>=cnoEWF|SmiNBzz4!f1<=5-V%lF`G{d(o%!?!xP z17Ma!W|oD%sW9YW!_}anF$4)$b?9kut@|RNUvE+o~u}I`cTT%fz^kq|$|31-%icnQSq0SWp5=<#%1aU|W!c>=Igf$`; z%2g?s!}&bpktZykit>zt6a``oG3q1TRGEnoMCB~L-75GIpR9SQn5PoX^(J_@$@f36 z^NS`JY$PgGC==Qc5)V;G6kNFFK8Gsflv9@>icx;M1q_{UD(Nq$YZF&m`cuX~4(0r3 z3*4=SbBRl9&sWaK`I8oa4+4=0sUSqLr`1O&88W1mUiobsXE99T>r>LpO$} zNgNON`8Zo=IwPln?$Cp2OoD;pS_92byGNravm2>B2o4)_r&D(uQBYg>Q8uzdzs-2$ zY}*=Nruw3%lW><#f{{JyTis}{9Umqoxwmg!hAP86-&%e8@#XWi0z1t;>s|fDtKYjX B%pU*% delta 1084 zcma)5%We}f6lFj~q8lVOumH(QD-|Kyd8A2c1dF6e8$we=nzU*WDjtt#;wEFe9w%vn zsvv%VN-X9tSRr-Cf`35p6G(glwo{s_Y#3Q1+jH){=bU@z_vy^fPc!eoSl>(6Z~i*_ zQL^q^b8RVk!M5=+jCmI?;h<+Dfdfn>f!)N;u4KIwlr87hOO9y?1`$qQm#z7SB*+v% zMn@-C!by_!ut@A&KIbg2rl%F_Uiz_YJ%}ok8lXi^ZKp=(uV%9j9Q{e#Rgvj1A)7Y@m!IfpPk@Vl6BLBq*GVDqugvz8kK%9`;c_bdk4` z$LfGQSJP`fyD9^**oLT0a39CYiNyBYL@pw=?TO)H(ji@Cjl?h>FwsfxtXr$;*L7=t ztZqPzV_&HQP+&k=OsG;6fRG6w+av+Lwh;J3b;3jdjt!OuKw!ioN=6FY z3XlvS*6l){3B?@@h$2n_1d(7p4lwN#!KjX0G9A&CGo~v=UGm(O3AvMt22Y1-8?|u^ z6}{Jn|GRS)89h;He$9F`P7K06Oc=G9f6&iz=ipL1rl}4l$R&-Oa*;!BCd91-O^n(# z^>I>j2X;vSB@=48R;L8tn7QJDvCyze?`~LYV`p{I%{ARzVfjfR>rIBwNL8~-LV}<+ zxsGL<{pX)BH_F#L@t)hr%MEX<5;UqK-VPegeC_BM@A2wjvsfMYq8z?zZSu~IdhswN z8&-B~h$-qlBWjc#wtBn%da~K#-dam+?>At>Z+6@k?X)?oMYX-2yB*Yzf^4x;XOizN zyUB~raAju%`*b@zEb=IlyS2!bs8Q)Bx$5%%7A-ZZm;9JLxm`c|c1=CcD_b+=&!x8? F{s6YPU?>0p diff --git a/inspector-vc/src/test/resources/ob30/simple-json.svg b/inspector-vc/src/test/resources/ob30/simple-json.svg index 4a4f39c..9b83371 100644 --- a/inspector-vc/src/test/resources/ob30/simple-json.svg +++ b/inspector-vc/src/test/resources/ob30/simple-json.svg @@ -10,54 +10,49 @@ "https://purl.imsglobal.org/spec/ob/v3p0/extensions.json", "https://w3id.org/security/suites/ed25519-2020/v1" ], - "id": "http://example.edu/credentials/3732", + "id": "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584", "type": [ "VerifiableCredential", - "OpenBadgeCredential" + "AchievementCredential" ], "issuer": { - "id": "https://example.edu/issuers/565049", "type": [ "Profile" ], - "name": "Example University" + "name": "Andy F. Miller", + "id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164" }, - "issuanceDate": "2010-01-01T00:00:00Z", - "name": "Example University Degree", + "issuanceDate": "2022-11-10T07:38:00-08:00", + "name": "test 1", "credentialSubject": { - "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164", "type": [ "AchievementSubject" ], "achievement": { - "id": "https://example.com/achievements/21st-century-skills/teamwork", + "id": "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510", "type": [ "Achievement" ], + "achievementType": "Achievement", + "name": "test 1", + "description": "This is a test 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" + "narrative": "There is no criteria" + } } }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json", - "type": "1EdTechJsonSchemaValidator2019" - } - ], "proof": [ { "type": "Ed25519Signature2020", - "created": "2022-09-15T15:48:32Z", - "verificationMethod": "https://example.edu/issuers/565049#z6MkmY1R6tG2NEdRHzphdRT6JqxeYpHwLAHwbrDfQULpkMAj", + "created": "2022-11-10T19:36:07Z", "proofPurpose": "assertionMethod", - "proofValue": "z3yUuWbFsLUp2CUrSZRaRbTk1UnkhpoJgJYu1SdMqd3AEMotpY41sKky7VzavnSfjApggtWJg1tcREvs5H4ZNnBRH" + "verificationMethod": "z6Mkt5PKegVQUpjQjoeiqkFa1HqpvMvehiLJuPMJcqX9hxM5", + "proofValue": "z4xh7M5Xpo4hU2bDU6dtQZgnuJCtJUhYCsMPBbCnhAvdnugDidH8anMJ6ayt7vR74iL5mhgJgTDQnNHoYrCnhARVD" } ] } - ]]> + ]]> diff --git a/inspector-vc/src/test/resources/ob30/simple.json b/inspector-vc/src/test/resources/ob30/simple.json index 6c48673..92fa200 100644 --- a/inspector-vc/src/test/resources/ob30/simple.json +++ b/inspector-vc/src/test/resources/ob30/simple.json @@ -5,50 +5,45 @@ "https://purl.imsglobal.org/spec/ob/v3p0/extensions.json", "https://w3id.org/security/suites/ed25519-2020/v1" ], - "id": "http://example.edu/credentials/3732", + "id": "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584", "type": [ "VerifiableCredential", - "OpenBadgeCredential" + "AchievementCredential" ], "issuer": { - "id": "https://example.edu/issuers/565049", "type": [ "Profile" ], - "name": "Example University" + "name": "Andy F. Miller", + "id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164" }, - "issuanceDate": "2010-01-01T00:00:00Z", - "name": "Example University Degree", + "issuanceDate": "2022-11-10T07:38:00-08:00", + "name": "test 1", "credentialSubject": { - "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164", "type": [ "AchievementSubject" ], "achievement": { - "id": "https://example.com/achievements/21st-century-skills/teamwork", + "id": "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510", "type": [ "Achievement" ], + "achievementType": "Achievement", + "name": "test 1", + "description": "This is a test 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" + "narrative": "There is no criteria" + } } }, - "credentialSchema": [ - { - "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json", - "type": "1EdTechJsonSchemaValidator2019" - } - ], "proof": [ { "type": "Ed25519Signature2020", - "created": "2022-09-15T15:48:32Z", - "verificationMethod": "https://example.edu/issuers/565049#z6MkmY1R6tG2NEdRHzphdRT6JqxeYpHwLAHwbrDfQULpkMAj", + "created": "2022-11-10T19:36:07Z", "proofPurpose": "assertionMethod", - "proofValue": "z3yUuWbFsLUp2CUrSZRaRbTk1UnkhpoJgJYu1SdMqd3AEMotpY41sKky7VzavnSfjApggtWJg1tcREvs5H4ZNnBRH" + "verificationMethod": "z6Mkt5PKegVQUpjQjoeiqkFa1HqpvMvehiLJuPMJcqX9hxM5", + "proofValue": "z4xh7M5Xpo4hU2bDU6dtQZgnuJCtJUhYCsMPBbCnhAvdnugDidH8anMJ6ayt7vR74iL5mhgJgTDQnNHoYrCnhARVD" } ] } \ No newline at end of file From aec2be38bd531e8e323a2a1788a9d2840e11454e Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 10 Nov 2022 11:56:25 -0800 Subject: [PATCH 4/5] Use Multicodec to decode --- .../oneedtech/inspect/vc/probe/EmbeddedProofProbe.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java index 554a0cf..81ab97a 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java @@ -3,7 +3,6 @@ package org.oneedtech.inspect.vc.probe; import java.io.StringReader; import java.net.URI; -import org.bouncycastle.util.Arrays; import org.oneedtech.inspect.core.probe.Probe; import org.oneedtech.inspect.core.probe.RunContext; import org.oneedtech.inspect.core.report.ReportItems; @@ -12,6 +11,8 @@ import org.oneedtech.inspect.vc.util.CachingDocumentLoader; import com.apicatalog.ld.DocumentError; import com.apicatalog.multibase.Multibase; +import com.apicatalog.multicodec.Multicodec; +import com.apicatalog.multicodec.Multicodec.Codec; import com.apicatalog.vc.processor.StatusVerifier; import com.danubetech.verifiablecredentials.VerifiableCredential; @@ -74,10 +75,11 @@ public class EmbeddedProofProbe extends Probe { } // Decode the Multibase to Multicodec and check that it is an Ed25519 public key + // https://w3c-ccg.github.io/di-eddsa-2020/#ed25519verificationkey2020 byte[] publicKeyMulticodec; try { publicKeyMulticodec = Multibase.decode(publicKeyMultibase); - if (publicKeyMulticodec[0] != -19 || publicKeyMulticodec[1] != 1) { + if (publicKeyMulticodec[0] != (byte) 0xed || publicKeyMulticodec[1] != (byte) 0x01) { return error("Verification method does not contain an Ed25519 public key", ctx); } } catch (Exception e) { @@ -85,7 +87,7 @@ public class EmbeddedProofProbe extends Probe { } // Extract the publicKey bytes from the Multicodec - byte[] publicKey = Arrays.copyOfRange(publicKeyMulticodec, 2, publicKeyMulticodec.length); + byte[] publicKey = Multicodec.decode(Codec.Ed25519PublicKey, publicKeyMulticodec); Ed25519Signature2020LdVerifier verifier = new Ed25519Signature2020LdVerifier(publicKey); From 4eb82c819bb2dac758a8f9253781dda4bbe78228 Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 10 Nov 2022 14:16:27 -0800 Subject: [PATCH 5/5] Use URI methods --- .../inspect/vc/probe/EmbeddedProofProbe.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java index 81ab97a..66ca945 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java @@ -58,21 +58,22 @@ public class EmbeddedProofProbe extends Probe { // TODO fourth format that we don't support yet: a URL that returns a Ed25519VerificationKey2020 // if starts with http and does not have hashcode, try fetch and see if returns Ed25519VerificationKey2020 // property is publicKeyMultibase + + publicKeyMultibase = method.toString(); - if (method.toString().contains("#")) { - publicKeyMultibase = method.getFragment(); - } else { - if (method.toString().startsWith("did")) { - String didScheme = method.getSchemeSpecificPart(); - if (didScheme.startsWith("key:")) { - publicKeyMultibase = didScheme.substring(4); - } else { - return error("Unknown verification method: " + method.toString(), ctx); - } - } else { - publicKeyMultibase = method.toString(); - } - } + if (method.getFragment() != null) { + publicKeyMultibase = method.getFragment(); + } else { + if (method.getScheme().equals("did")) { + if (method.getSchemeSpecificPart().startsWith("key:")) { + publicKeyMultibase = method.getSchemeSpecificPart().substring(4); + } else { + return error("Unknown verification method: " + method, ctx); + } + } else if (method.getScheme().equals("http") || method.getScheme().equals("https")) { + return error("Cannot parse http verification key yet", ctx); + } + } // Decode the Multibase to Multicodec and check that it is an Ed25519 public key // https://w3c-ccg.github.io/di-eddsa-2020/#ed25519verificationkey2020