Added verification dependencies validation
This commit is contained in:
@@ -335,7 +335,7 @@ public class Assertion extends Credential {
|
||||
.put(Type.VerificationObjectIssuer, List.of(
|
||||
new Validation.Builder().name("type").type(ValueType.RDF_TYPE).many(true).defaultType(Type.VerificationObject).build(),
|
||||
new Validation.Builder().name("verificationProperty").type(ValueType.COMPACT_IRI).build(),
|
||||
new Validation.Builder().name("startsWith").type(ValueType.URL).build(),
|
||||
new Validation.Builder().name("startsWith").type(ValueType.URL).many(true).build(),
|
||||
new Validation.Builder().name("allowedOrigins").type(ValueType.URL_AUTHORITY).many(true).build()
|
||||
))
|
||||
.put(Type.External, Collections.emptyList())
|
||||
|
||||
@@ -153,8 +153,8 @@ public class OB20Inspector extends Inspector {
|
||||
|
||||
// verification and revocation
|
||||
if (assertion.getCredentialType() == Type.Assertion) {
|
||||
for(Probe<JsonLdGeneratedObject> probe : List.of(new VerificationDependenciesProbe(assertion.getId()),
|
||||
new AssertionRevocationListProbe(assertion.getId()))) {
|
||||
for(Probe<JsonLdGeneratedObject> probe : List.of(new VerificationDependenciesProbe(assertionNode.get("id").asText()),
|
||||
new AssertionRevocationListProbe(assertionNode.get("id").asText()))) {
|
||||
probeCount++;
|
||||
accumulator.add(probe.run(jsonLdGeneratedObject, ctx));
|
||||
if(broken(accumulator)) return abort(ctx, accumulator, probeCount);
|
||||
|
||||
Reference in New Issue
Block a user