use of org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver in project verify-hub by alphagov.
the class SamlEngineModule method registerMetadataRefreshTask.
@Provides
@Named("VERIFY_METADATA_REFRESH_TASK")
@Singleton
private Task registerMetadataRefreshTask(Environment environment, @Named(VERIFY_METADATA_RESOLVER) MetadataResolver metadataResolver) {
Task task = new Task("metadata-refresh") {
@Override
public void execute(Map<String, List<String>> parameters, PrintWriter output) throws Exception {
((AbstractReloadingMetadataResolver) metadataResolver).refresh();
}
};
environment.admin().addTask(task);
return task;
}
use of org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver in project verify-hub by alphagov.
the class HubMetadataPublicKeyStoreTest method initializeMetadata.
private static MetadataResolver initializeMetadata(String xml) throws ComponentInitializationException {
AbstractReloadingMetadataResolver metadataResolver = new StringBackedMetadataResolver(xml);
BasicParserPool basicParserPool = new BasicParserPool();
basicParserPool.initialize();
metadataResolver.setParserPool(basicParserPool);
metadataResolver.setId("testResolver");
metadataResolver.setRequireValidMetadata(true);
metadataResolver.initialize();
return metadataResolver;
}
Aggregations