Page tree

The OpenSAML 2 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only.

Skip to end of metadata
Go to start of metadata

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 unmarshallMetadata(!InputStream) and filterMetadata(XMLObject) for unmarshalling and filtering the metadata, respectively.

Caching Metadata

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 clearDescriptorIndex() .

  • No labels