Fix ob3 tests

- Update context URL (imsglobal.github.io no longer exists)
- Update simple* resources with updated ob3 spec example json
This commit is contained in:
Andy Miller (IMS)
2022-11-16 11:24:42 -08:00
parent 1b1e58bde1
commit bd106f9761
13 changed files with 66 additions and 59 deletions
@@ -61,12 +61,12 @@ public class ContextPropertyProbe extends Probe<JsonNode> {
private final static Map<Set<Credential.Type>, List<String>> values = new ImmutableMap.Builder<Set<Credential.Type>, List<String>>()
.put(Set.of(OpenBadgeCredential, AchievementCredential, EndorsementCredential),
List.of("https://www.w3.org/2018/credentials/v1",
//"https://imsglobal.github.io/openbadges-specification/context.json")) //dev legacy
//"https://purl.imsglobal.org/spec/ob/v3p0/context.json")) //dev legacy
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
.put(Set.of(ClrCredential),
List.of("https://www.w3.org/2018/credentials/v1",
// "https://dc.imsglobal.org/draft/clr/v2p0/context", //dev legacy
// "https://imsglobal.github.io/openbadges-specification/context.json")) //dev legacy
// "https://purl.imsglobal.org/spec/ob/v3p0/context.json")) //dev legacy
"https://purl.imsglobal.org/spec/clr/v2p0/context.json",
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
@@ -128,7 +128,7 @@ public class EmbeddedProofProbe extends Probe<Credential> {
return error("Verification method does not contain an Ed25519 public key", ctx);
}
} catch (Exception e) {
return fatal("Invalid public key: " + e.getMessage(), ctx);
return error("Invalid public key: " + e.getMessage(), ctx);
}
if (controller != null) {
@@ -43,7 +43,7 @@ public class CachingDocumentLoader implements DocumentLoader {
.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/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://purl.imsglobal.org/spec/ob/v3p0/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"))
.put("https://w3id.org/security/suites/ed25519-2020/v1",Resources.getResource("contexts/security-suites-ed25519-2020-v1.jsonld"))