#ifndef __saml2_metadataprov_h__
#define __saml2_metadataprov_h__
-#include <xmltooling/Lockable.h>
#include <saml/saml2/metadata/MetadataFilter.h>
+#include <xmltooling/Lockable.h>
+#include <xmltooling/signature/KeyResolver.h>
+
namespace opensaml {
class SAML_API SAMLArtifact;
protected:
/**
- * Constructor. If a DOM is supplied, a set of default logic will be
- * used to identify and build MetadataFilter plugins and install them
- * into the provider. The following XML content is supported:
+ * Constructor.
+ *
+ * If a DOM is supplied, a set of default logic will be used to identify
+ * and build MetadataFilter plugins and install them into the provider.
+ * A KeyResolver can also be supplied, or a default resolver will be used.
+ *
+ * The following XML content is supported:
*
* <ul>
+ * <li><KeyResolver> elements with a type attribute
* <li><MetadataFilter> elements with a type attribute
* <li><Exclude> elements representing a BlacklistMetadataFilter
* <li><BlacklistMetadataFilter> element containing <Exclude> elements
virtual void init()=0;
/**
+ * Returns a KeyResolver associated with this metadata provider, if any.
+ *
+ * @return an associated KeyResolver, or NULL
+ */
+ virtual const xmlsignature::KeyResolver* getKeyResolver() const {
+ return m_resolver;
+ }
+
+ /**
* Gets the entire metadata tree, after the registered filter has been applied.
* The caller MUST unlock the provider when finished with the data.
*
virtual const EntitiesDescriptor* getEntitiesDescriptor(const char* name, bool requireValidMetadata=true) const;
protected:
+ /** Embedded KeyResolver instance. */
+ xmlsignature::KeyResolver* m_resolver;
+
/**
* Applies any installed filters to a metadata instance.
*