Creating a new Metadata Provider
Metadata providers allow the fetching and querying of metadata for entity descriptors and roles, a common task in almost all SAML-enabled systems. The easiest way to implement the a new metadata provider is to create a class that extends
org.opensaml.saml2.metadata.provider.AbstractMetadataProvider . This class requires the implementation of one method
fetchMetadata() which returns the unmarshalled and filtered metadata. This class provides the helper methods
filterMetadata(XMLObject) for unmarshalling and filtering the metadata, respectively.
Metadata is generally a relatively static thing and so many metadata providers will cache the unmarshalled and filtered metadata for performance reasons. Whenever a new metadata document is fetched by the
fetchMetadata() method the provider MUST call