X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2FMetadataProvider.h;h=bc3f164684ee26c4f91fd19e7b1b8c472dbad10b;hb=01fe9dc618b7e57645b71a23757657102e9ac380;hp=7f5d38679ff4c7c9188d43c4990089ecac177a54;hpb=0b9c2825fb2fad1b6eadde350c799c10e31ace78;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/metadata/MetadataProvider.h b/saml/saml2/metadata/MetadataProvider.h index 7f5d386..bc3f164 100644 --- a/saml/saml2/metadata/MetadataProvider.h +++ b/saml/saml2/metadata/MetadataProvider.h @@ -23,14 +23,19 @@ #ifndef __saml2_metadataprov_h__ #define __saml2_metadataprov_h__ -#include #include +#include +#include + namespace opensaml { class SAML_API SAMLArtifact; namespace saml2md { + + class SAML_API EntityDescriptor; + class SAML_API EntitiesDescriptor; /** * Supplies an individual source of metadata. @@ -45,15 +50,21 @@ 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: * *
    - *
  • <MetadataFilter> elements with a type attribute + *
  • <KeyResolver> elements with a type attribute + *
  • <MetadataFilter> elements with a type attribute and type-specific content *
  • <Exclude> elements representing a BlacklistMetadataFilter *
  • <BlacklistMetadataFilter> element containing <Exclude> elements *
  • <Include> elements representing a WhitelistMetadataFilter + *
  • <SignatureMetadataFilter> element containing a <KeyResolver> element *
  • <WhitelistMetadataFilter> element containing <Include> elements *
* @@ -105,6 +116,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 +192,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. * @@ -199,7 +222,7 @@ namespace opensaml { /** * Clear the cache of known entities and groups. */ - virtual void clearIndex(); + virtual void clearDescriptorIndex(); private: std::vector m_filters;