X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2FMetadataProvider.h;h=f773e411c378896735a55e7d99a49d6911d8542b;hb=0b82e01f64f7b2391cea3762057a09a7db3cef78;hp=1c2765ee3eacf07e1639b53da0999394037dc8d0;hpb=5b37e4a8d91373f6ed42ef77d1de39526d1d271c;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/metadata/MetadataProvider.h b/saml/saml2/metadata/MetadataProvider.h index 1c2765e..f773e41 100644 --- a/saml/saml2/metadata/MetadataProvider.h +++ b/saml/saml2/metadata/MetadataProvider.h @@ -23,9 +23,11 @@ #ifndef __saml2_metadataprov_h__ #define __saml2_metadataprov_h__ -#include #include +#include +#include + namespace opensaml { class SAML_API SAMLArtifact; @@ -45,11 +47,16 @@ namespace opensaml { 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: * *
    + *
  • <KeyResolver> elements with a type attribute *
  • <MetadataFilter> elements with a type attribute *
  • <Exclude> elements representing a BlacklistMetadataFilter *
  • <BlacklistMetadataFilter> element containing <Exclude> elements @@ -105,6 +112,15 @@ namespace opensaml { 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. * @@ -172,6 +188,9 @@ namespace opensaml { 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. *