Move probes up to follow verification section in spec document

This commit is contained in:
Xavi Aracil 2023-01-05 14:30:25 +01:00
parent f0cddf0906
commit 4abd45937c

View File

@ -174,6 +174,16 @@ public class OB30Inspector extends VCInspector implements SubInspector {
probeCount++; probeCount++;
accumulator.add(new CredentialSubjectProbe("AchievementSubject", true).run(ob.getJson(), ctx)); accumulator.add(new CredentialSubjectProbe("AchievementSubject", true).run(ob.getJson(), ctx));
// evidence
probeCount++;
accumulator.add(new EvidenceProbe().run(ob.getJson(), ctx));
if(broken(accumulator)) return abort(ctx, accumulator, probeCount);
// issuer
probeCount++;
accumulator.add(new IssuerProbe().run(ob.getJson(), ctx));
if(broken(accumulator)) return abort(ctx, accumulator, probeCount);
//signatures, proofs //signatures, proofs
probeCount++; probeCount++;
if(ob.getProofType() == EXTERNAL){ if(ob.getProofType() == EXTERNAL){
@ -204,16 +214,6 @@ public class OB30Inspector extends VCInspector implements SubInspector {
if(broken(accumulator)) return abort(ctx, accumulator, probeCount); if(broken(accumulator)) return abort(ctx, accumulator, probeCount);
} }
// evidence
probeCount++;
accumulator.add(new EvidenceProbe().run(ob.getJson(), ctx));
if(broken(accumulator)) return abort(ctx, accumulator, probeCount);
// issuer
probeCount++;
accumulator.add(new IssuerProbe().run(ob.getJson(), ctx));
if(broken(accumulator)) return abort(ctx, accumulator, probeCount);
//embedded endorsements //embedded endorsements
EndorsementInspector endorsementInspector = new EndorsementInspector.Builder().build(); EndorsementInspector endorsementInspector = new EndorsementInspector.Builder().build();