Merge pull request #45 from imsglc/fix-inspector-vc

Apply fixes to inspector-vc
This commit is contained in:
Xavi Aracil 2022-11-15 10:00:57 +01:00 committed by GitHub
commit ce225fc891
7 changed files with 174 additions and 171 deletions

View File

@ -3,7 +3,6 @@ package org.oneedtech.inspect.vc.probe;
import java.io.StringReader; import java.io.StringReader;
import java.net.URI; import java.net.URI;
import org.bouncycastle.util.Arrays;
import org.oneedtech.inspect.core.probe.Probe; import org.oneedtech.inspect.core.probe.Probe;
import org.oneedtech.inspect.core.probe.RunContext; import org.oneedtech.inspect.core.probe.RunContext;
import org.oneedtech.inspect.core.report.ReportItems; 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.ld.DocumentError;
import com.apicatalog.multibase.Multibase; import com.apicatalog.multibase.Multibase;
import com.apicatalog.multicodec.Multicodec;
import com.apicatalog.multicodec.Multicodec.Codec;
import com.apicatalog.vc.processor.StatusVerifier; import com.apicatalog.vc.processor.StatusVerifier;
import com.danubetech.verifiablecredentials.VerifiableCredential; import com.danubetech.verifiablecredentials.VerifiableCredential;
@ -58,26 +59,28 @@ public class EmbeddedProofProbe extends Probe<Credential> {
// if starts with http and does not have hashcode, try fetch and see if returns Ed25519VerificationKey2020 // if starts with http and does not have hashcode, try fetch and see if returns Ed25519VerificationKey2020
// property is publicKeyMultibase // property is publicKeyMultibase
if (method.toString().contains("#")) { publicKeyMultibase = method.toString();
publicKeyMultibase = method.getFragment();
} else { if (method.getFragment() != null) {
if (method.toString().startsWith("did")) { publicKeyMultibase = method.getFragment();
String didScheme = method.getSchemeSpecificPart(); } else {
if (didScheme.startsWith("key:")) { if (method.getScheme().equals("did")) {
publicKeyMultibase = didScheme.substring(4); if (method.getSchemeSpecificPart().startsWith("key:")) {
} else { publicKeyMultibase = method.getSchemeSpecificPart().substring(4);
return error("Unknown verification method: " + method.toString(), ctx); } else {
} return error("Unknown verification method: " + method, ctx);
} else { }
publicKeyMultibase = method.toString(); } 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 // 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; byte[] publicKeyMulticodec;
try { try {
publicKeyMulticodec = Multibase.decode(publicKeyMultibase); 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); return error("Verification method does not contain an Ed25519 public key", ctx);
} }
} catch (Exception e) { } catch (Exception e) {
@ -85,7 +88,7 @@ public class EmbeddedProofProbe extends Probe<Credential> {
} }
// Extract the publicKey bytes from the Multicodec // 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); Ed25519Signature2020LdVerifier verifier = new Ed25519Signature2020LdVerifier(publicKey);

View File

@ -42,6 +42,7 @@ public class CachingDocumentLoader implements DocumentLoader {
static final ImmutableMap<String, URL> bundled = ImmutableMap.<String, URL>builder() static final ImmutableMap<String, URL> bundled = ImmutableMap.<String, URL>builder()
.put("https://purl.imsglobal.org/spec/clr/v2p0/context.json",Resources.getResource("contexts/clr-v2p0.json")) .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://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/did/v1", Resources.getResource("contexts/did-v1.jsonld"))
.put("https://www.w3.org/ns/odrl.jsonld", Resources.getResource("contexts/odrl.jsonld")) .put("https://www.w3.org/ns/odrl.jsonld", Resources.getResource("contexts/odrl.jsonld"))

View File

@ -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"
}
}

View File

@ -6,56 +6,56 @@
"xsd": "https://www.w3.org/2001/XMLSchema#", "xsd": "https://www.w3.org/2001/XMLSchema#",
"OpenBadgeCredential": { "OpenBadgeCredential": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#OpenBadgeCredential" "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#OpenBadgeCredential"
}, },
"Achievement": { "Achievement": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Achievement", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Achievement",
"@context": { "@context": {
"achievementType": { "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" "@type": "xsd:string"
}, },
"alignment": { "alignment": {
"@id": "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/ob/v3p0/vocab.html#Alignment", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Alignment",
"@container": "@set" "@container": "@set"
}, },
"creator": { "creator": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile" "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Profile"
}, },
"creditsAvailable": { "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" "@type": "xsd:float"
}, },
"criteria": { "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" "@type": "@id"
}, },
"fieldOfStudy": { "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" "@type": "xsd:string"
}, },
"humanCode": { "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" "@type": "xsd:string"
}, },
"otherIdentifier": { "otherIdentifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#otherIdentifier", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#otherIdentifier",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentifierEntry",
"@container": "@set" "@container": "@set"
}, },
"related": { "related": {
"@id": "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/ob/v3p0/vocab.html#Related", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Related",
"@container": "@set" "@container": "@set"
}, },
"resultDescription": { "resultDescription": {
"@id": "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/ob/v3p0/vocab.html#ResultDescription", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#ResultDescription",
"@container": "@set" "@container": "@set"
}, },
"specialization": { "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" "@type": "xsd:string"
}, },
"tag": { "tag": {
@ -64,7 +64,7 @@
"@container": "@set" "@container": "@set"
}, },
"version": { "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" "@type": "xsd:string"
} }
} }
@ -73,60 +73,60 @@
"@id": "OpenBadgeCredential" "@id": "OpenBadgeCredential"
}, },
"AchievementSubject": { "AchievementSubject": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#AchievementSubject", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#AchievementSubject",
"@context": { "@context": {
"achievement": { "achievement": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Achievement" "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Achievement"
}, },
"activityEndDate": { "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" "@type": "xsd:date"
}, },
"activityStartDate": { "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" "@type": "xsd:date"
}, },
"creditsEarned": { "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" "@type": "xsd:float"
}, },
"identifier": { "identifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifier", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#identifier",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentityObject", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentityObject",
"@container": "@set" "@container": "@set"
}, },
"licenseNumber": { "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" "@type": "xsd:string"
}, },
"result": { "result": {
"@id": "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/ob/v3p0/vocab.html#Result", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Result",
"@container": "@set" "@container": "@set"
}, },
"role": { "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" "@type": "xsd:string"
}, },
"source": { "source": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#source", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#source",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile" "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Profile"
}, },
"term": { "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" "@type": "xsd:string"
} }
} }
}, },
"Address": { "Address": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Address", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address",
"@context": { "@context": {
"addressCountry": { "addressCountry": {
"@id": "https://schema.org/addressCountry", "@id": "https://schema.org/addressCountry",
"@type": "xsd:string" "@type": "xsd:string"
}, },
"addressCountryCode": { "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" "@type": "xsd:string"
}, },
"addressLocality": { "addressLocality": {
@ -138,7 +138,7 @@
"@type": "xsd:string" "@type": "xsd:string"
}, },
"geo": { "geo": {
"@id" : "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#GeoCoordinates" "@id" : "https://purl.imsglobal.org/spec/vc/ob/vocab.html#GeoCoordinates"
}, },
"postOfficeBoxNumber": { "postOfficeBoxNumber": {
"@id": "https://schema.org/postOfficeBoxNumber", "@id": "https://schema.org/postOfficeBoxNumber",
@ -158,7 +158,7 @@
"@id": "https://schema.org/Alignment", "@id": "https://schema.org/Alignment",
"@context": { "@context": {
"targetCode": { "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" "@type": "xsd:string"
}, },
"targetDescription": { "targetDescription": {
@ -174,7 +174,7 @@
"@type": "xsd:string" "@type": "xsd:string"
}, },
"targetType": { "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" "@type": "xsd:string"
}, },
"targetUrl": { "targetUrl": {
@ -184,22 +184,22 @@
} }
}, },
"Criteria": { "Criteria": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Criteria" "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Criteria"
}, },
"EndorsementCredential": { "EndorsementCredential": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementCredential" "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#EndorsementCredential"
}, },
"EndorsementSubject": { "EndorsementSubject": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementSubject", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#EndorsementSubject",
"@context": { "@context": {
"endorsementComment": { "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" "@type": "xsd:string"
} }
} }
}, },
"Evidence": { "Evidence": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Evidence", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Evidence",
"@context": { "@context": {
"audience": { "audience": {
"@id": "https://schema.org/audience", "@id": "https://schema.org/audience",
@ -212,7 +212,7 @@
} }
}, },
"GeoCoordinates": { "GeoCoordinates": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#GeoCoordinates", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#GeoCoordinates",
"@context": { "@context": {
"latitude": { "latitude": {
"@id": "https://schema.org/latitude", "@id": "https://schema.org/latitude",
@ -225,41 +225,41 @@
} }
}, },
"IdentifierEntry": { "IdentifierEntry": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentifierEntry",
"@context": { "@context": {
"identifier": { "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" "@type": "xsd:string"
}, },
"identifierType": { "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" "@type": "xsd:string"
} }
} }
}, },
"IdentityObject": { "IdentityObject": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentityObject", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentityObject",
"@context": { "@context": {
"hashed": { "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" "@type": "xsd:boolean"
}, },
"identityHash": { "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" "@type": "xsd:string"
}, },
"identityType": { "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" "@type": "xsd:string"
}, },
"salt": { "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" "@type": "xsd:string"
} }
} }
}, },
"Image": { "Image": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Image", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Image",
"@context": { "@context": {
"caption": { "caption": {
"@id": "https://schema.org/caption", "@id": "https://schema.org/caption",
@ -268,17 +268,17 @@
} }
}, },
"Profile": { "Profile": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Profile",
"@context": { "@context": {
"additionalName": { "additionalName": {
"@id": "https://schema.org/additionalName", "@id": "https://schema.org/additionalName",
"@type": "xsd:string" "@type": "xsd:string"
}, },
"address": { "address": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Address" "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"
}, },
"dateOfBirth": { "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" "@type": "xsd:date"
}, },
"email": { "email": {
@ -290,7 +290,7 @@
"@type": "xsd:string" "@type": "xsd:string"
}, },
"familyNamePrefix": { "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" "@type": "xsd:string"
}, },
"givenName": { "givenName": {
@ -306,50 +306,50 @@
"@type": "xsd:string" "@type": "xsd:string"
}, },
"otherIdentifier": { "otherIdentifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#otherIdentifier", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#otherIdentifier",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#IdentifierEntry",
"@container": "@set" "@container": "@set"
}, },
"parentOrg": { "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" "@type": "xsd:string"
}, },
"patronymicName": { "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" "@type": "xsd:string"
}, },
"phone": { "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" "@type": "xsd:string"
}, },
"official": { "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" "@type": "xsd:string"
} }
} }
}, },
"Related": { "Related": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Related", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Related",
"@context": { "@context": {
"version": { "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" "@type": "xsd:string"
} }
} }
}, },
"Result": { "Result": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Result", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Result",
"@context": { "@context": {
"achievedLevel": { "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" "@type": "xsd:anyURI"
}, },
"resultDescription": { "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" "@type": "xsd:anyURI"
}, },
"status": { "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" "@type": "xsd:string"
}, },
"value": { "value": {
@ -359,56 +359,56 @@
} }
}, },
"ResultDescription": { "ResultDescription": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#ResultDescription", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#ResultDescription",
"@context": { "@context": {
"allowedValue": { "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", "@type": "xsd:string",
"@container": "@set" "@container": "@set"
}, },
"requiredLevel": { "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" "@type": "xsd:anyURI"
}, },
"requiredValue": { "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" "@type": "xsd:string"
}, },
"resultType": { "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" "@type": "xsd:string"
}, },
"rubricCriterionLevel": { "rubricCriterionLevel": {
"@id": "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/ob/v3p0/vocab.html#RubricCriterionLevel", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#RubricCriterionLevel",
"@container": "@set" "@container": "@set"
}, },
"valueMax": { "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" "@type": "xsd:string"
}, },
"valueMin": { "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" "@type": "xsd:string"
} }
} }
}, },
"RubricCriterionLevel": { "RubricCriterionLevel": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#RubricCriterionLevel", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#RubricCriterionLevel",
"@context": { "@context": {
"level": { "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" "@type": "xsd:string"
}, },
"points": { "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" "@type": "xsd:string"
} }
} }
}, },
"alignment": { "alignment": {
"@id": "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/ob/v3p0/vocab.html#Alignment", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Alignment",
"@container": "@set" "@container": "@set"
}, },
"description": { "description": {
@ -416,20 +416,20 @@
"@type": "xsd:string" "@type": "xsd:string"
}, },
"endorsement": { "endorsement": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#endorsement", "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#endorsement",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementCredential", "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#EndorsementCredential",
"@container": "@set" "@container": "@set"
}, },
"image": { "image": {
"@id": "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/ob/v3p0/vocab.html#Image" "@type": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Image"
}, },
"name": { "name": {
"@id": "https://schema.org/name", "@id": "https://schema.org/name",
"@type": "xsd:string" "@type": "xsd:string"
}, },
"narrative": { "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" "@type": "xsd:string"
}, },
"url": { "url": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -10,54 +10,49 @@
"https://purl.imsglobal.org/spec/ob/v3p0/extensions.json", "https://purl.imsglobal.org/spec/ob/v3p0/extensions.json",
"https://w3id.org/security/suites/ed25519-2020/v1" "https://w3id.org/security/suites/ed25519-2020/v1"
], ],
"id": "http://example.edu/credentials/3732", "id": "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584",
"type": [ "type": [
"VerifiableCredential", "VerifiableCredential",
"OpenBadgeCredential" "AchievementCredential"
], ],
"issuer": { "issuer": {
"id": "https://example.edu/issuers/565049",
"type": [ "type": [
"Profile" "Profile"
], ],
"name": "Example University" "name": "Andy F. Miller",
"id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164"
}, },
"issuanceDate": "2010-01-01T00:00:00Z", "issuanceDate": "2022-11-10T07:38:00-08:00",
"name": "Example University Degree", "name": "test 1",
"credentialSubject": { "credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21", "id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164",
"type": [ "type": [
"AchievementSubject" "AchievementSubject"
], ],
"achievement": { "achievement": {
"id": "https://example.com/achievements/21st-century-skills/teamwork", "id": "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510",
"type": [ "type": [
"Achievement" "Achievement"
], ],
"achievementType": "Achievement",
"name": "test 1",
"description": "This is a test achievement",
"criteria": { "criteria": {
"narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management." "narrative": "There is no criteria"
}, }
"description": "This badge recognizes the development of the capacity to collaborate within a group environment.",
"name": "Teamwork"
} }
}, },
"credentialSchema": [
{
"id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json",
"type": "1EdTechJsonSchemaValidator2019"
}
],
"proof": [ "proof": [
{ {
"type": "Ed25519Signature2020", "type": "Ed25519Signature2020",
"created": "2022-09-15T15:48:32Z", "created": "2022-11-10T19:36:07Z",
"verificationMethod": "https://example.edu/issuers/565049#z6MkmY1R6tG2NEdRHzphdRT6JqxeYpHwLAHwbrDfQULpkMAj",
"proofPurpose": "assertionMethod", "proofPurpose": "assertionMethod",
"proofValue": "z3yUuWbFsLUp2CUrSZRaRbTk1UnkhpoJgJYu1SdMqd3AEMotpY41sKky7VzavnSfjApggtWJg1tcREvs5H4ZNnBRH" "verificationMethod": "z6Mkt5PKegVQUpjQjoeiqkFa1HqpvMvehiLJuPMJcqX9hxM5",
"proofValue": "z4xh7M5Xpo4hU2bDU6dtQZgnuJCtJUhYCsMPBbCnhAvdnugDidH8anMJ6ayt7vR74iL5mhgJgTDQnNHoYrCnhARVD"
} }
] ]
} }
]]> ]]>
</openbadges:credential> </openbadges:credential>
<g> <g>
<path fill="none" stroke="#040000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M500,928.8c0,0,0,40.8,245,40.8" /> <path fill="none" stroke="#040000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M500,928.8c0,0,0,40.8,245,40.8" />

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -5,50 +5,45 @@
"https://purl.imsglobal.org/spec/ob/v3p0/extensions.json", "https://purl.imsglobal.org/spec/ob/v3p0/extensions.json",
"https://w3id.org/security/suites/ed25519-2020/v1" "https://w3id.org/security/suites/ed25519-2020/v1"
], ],
"id": "http://example.edu/credentials/3732", "id": "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584",
"type": [ "type": [
"VerifiableCredential", "VerifiableCredential",
"OpenBadgeCredential" "AchievementCredential"
], ],
"issuer": { "issuer": {
"id": "https://example.edu/issuers/565049",
"type": [ "type": [
"Profile" "Profile"
], ],
"name": "Example University" "name": "Andy F. Miller",
"id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164"
}, },
"issuanceDate": "2010-01-01T00:00:00Z", "issuanceDate": "2022-11-10T07:38:00-08:00",
"name": "Example University Degree", "name": "test 1",
"credentialSubject": { "credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21", "id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164",
"type": [ "type": [
"AchievementSubject" "AchievementSubject"
], ],
"achievement": { "achievement": {
"id": "https://example.com/achievements/21st-century-skills/teamwork", "id": "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510",
"type": [ "type": [
"Achievement" "Achievement"
], ],
"achievementType": "Achievement",
"name": "test 1",
"description": "This is a test achievement",
"criteria": { "criteria": {
"narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management." "narrative": "There is no criteria"
}, }
"description": "This badge recognizes the development of the capacity to collaborate within a group environment.",
"name": "Teamwork"
} }
}, },
"credentialSchema": [
{
"id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json",
"type": "1EdTechJsonSchemaValidator2019"
}
],
"proof": [ "proof": [
{ {
"type": "Ed25519Signature2020", "type": "Ed25519Signature2020",
"created": "2022-09-15T15:48:32Z", "created": "2022-11-10T19:36:07Z",
"verificationMethod": "https://example.edu/issuers/565049#z6MkmY1R6tG2NEdRHzphdRT6JqxeYpHwLAHwbrDfQULpkMAj",
"proofPurpose": "assertionMethod", "proofPurpose": "assertionMethod",
"proofValue": "z3yUuWbFsLUp2CUrSZRaRbTk1UnkhpoJgJYu1SdMqd3AEMotpY41sKky7VzavnSfjApggtWJg1tcREvs5H4ZNnBRH" "verificationMethod": "z6Mkt5PKegVQUpjQjoeiqkFa1HqpvMvehiLJuPMJcqX9hxM5",
"proofValue": "z4xh7M5Xpo4hU2bDU6dtQZgnuJCtJUhYCsMPBbCnhAvdnugDidH8anMJ6ayt7vR74iL5mhgJgTDQnNHoYrCnhARVD"
} }
] ]
} }