idpMetadataProvider = new ResourceBackedMetadataProvider(new Timer(true), resource);
} else {
InputStream in = new ByteArrayInputStream(idpMetadata.getBytes());
Document inCommonMDDoc = parserPool.parse(in);
Element metadataRoot = inCommonMDDoc.getDocumentElement();
idpMetadataProvider = new DOMMetadataProvider(metadataRoot);
}
idpMetadataProvider.setParserPool(parserPool);
idpMetadataProvider.initialize();
} catch (MetadataProviderException e) {
throw new SamlException("Error initializing idpMetadataProvider", e);