Use Cached document loader

This commit is contained in:
Xavi Aracil 2023-11-12 10:54:08 +01:00
parent 43dc9fbc8c
commit d3ea0cde22

View File

@ -3,10 +3,10 @@ package org.oneedtech.inspect.vc;
import java.util.List; import java.util.List;
import org.oneedtech.inspect.vc.jsonld.JsonLDObjectUtils; import org.oneedtech.inspect.vc.jsonld.JsonLDObjectUtils;
import org.oneedtech.inspect.vc.util.CachingDocumentLoader;
import com.danubetech.verifiablecredentials.VerifiableCredential; import com.danubetech.verifiablecredentials.VerifiableCredential;
import foundation.identity.jsonld.ConfigurableDocumentLoader;
import info.weboftrust.ldsignatures.LdProof; import info.weboftrust.ldsignatures.LdProof;
/** /**
@ -17,10 +17,7 @@ public class W3CVCHolder {
public W3CVCHolder(VerifiableCredential credential) { public W3CVCHolder(VerifiableCredential credential) {
this.credential = credential; this.credential = credential;
ConfigurableDocumentLoader documentLoader = new ConfigurableDocumentLoader(); credential.setDocumentLoader(new CachingDocumentLoader());
documentLoader.setEnableHttp(true);
documentLoader.setEnableHttps(true);
credential.setDocumentLoader(documentLoader);
} }
/** /**