Class SAMLMetadataLookupHandler

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, MessageHandler

public class SAMLMetadataLookupHandler extends AbstractMessageHandler
Handler for inbound SAML protocol messages that attempts to locate SAML metadata for a SAML entity, and attaches it as a SAMLMetadataContext child of a pre-existing concrete instance of AbstractSAMLEntityContext.

The entity context class is configurable and defaults to SAMLPeerEntityContext. The handler will no-op in the absence of an existing AbstractSAMLEntityContext child of the message context with non-null values for both entityID and role.

If the optional copy strategy is configured via setCopyContextStrategy(Function), and if that lookup finds an existing metadata context with compatible data (matching entityID and role), then its data will be re-used.

Otherwise an attempt to resolve metadata will be performed with the configured RoleDescriptorResolver. A protocol from a SAMLProtocolContext will be added to the lookup, if available.