use of org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine in project MaxKey by dromara.
the class SignatureSecurityPolicyRule method loadTrustEngine.
public void loadTrustEngine() {
KeyInfoCredentialResolver keyInfoCredResolver = Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver();
trustEngine = new ExplicitKeySignatureTrustEngine(credentialResolver, keyInfoCredResolver);
}
use of org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine in project MaxKey by dromara.
the class SignatureSecurityPolicyRule method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
KeyInfoCredentialResolver keyInfoCredResolver = Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver();
trustEngine = new ExplicitKeySignatureTrustEngine(credentialResolver, keyInfoCredResolver);
}
use of org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine in project entcore by opendigitaleducation.
the class SamlValidator method loadSignatureTrustEngine.
private void loadSignatureTrustEngine(String filePath) throws MetadataProviderException {
logger.info(filePath);
FilesystemMetadataProvider metadataProvider = new FilesystemMetadataProvider(new File(filePath));
metadataProvider.setParserPool(new BasicParserPool());
metadataProvider.initialize();
MetadataCredentialResolver metadataCredResolver = new MetadataCredentialResolver(metadataProvider);
KeyInfoCredentialResolver keyInfoCredResolver = Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver();
EntityDescriptor entityDescriptor = (EntityDescriptor) metadataProvider.getMetadata();
String entityID = entityDescriptor.getEntityID();
entityDescriptorMap.put(entityID, entityDescriptor);
signatureTrustEngineMap.put(entityID, new ExplicitKeySignatureTrustEngine(metadataCredResolver, keyInfoCredResolver));
}
Aggregations