Class ProfileIdpMetadataResolver

java.lang.Object
se.idsec.signservice.integration.security.impl.ProfileIdpMetadataResolver
All Implemented Interfaces:
IdpMetadataResolver

public class ProfileIdpMetadataResolver extends Object implements IdpMetadataResolver
An IdpMetadataResolver that offers the possibility to use different resolvers for different profiles.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • ProfileIdpMetadataResolver

      public ProfileIdpMetadataResolver()
  • Method Details

    • resolveMetadata

      public org.opensaml.saml.saml2.metadata.EntityDescriptor resolveMetadata(@Nonnull String entityID, @Nonnull IntegrationServiceConfiguration config) throws MetadataException
      Gets the (valid) metadata for the given SAML IdP.
      Specified by:
      resolveMetadata in interface IdpMetadataResolver
      Parameters:
      entityID - the entityID for the IdP
      config - policy configuration
      Returns:
      the IdP metadata
      Throws:
      MetadataException - if no valid metadata can be found, or any other error occur
    • setResolvers

      public void setResolvers(Map<String,IdpMetadataResolver> resolvers)
      Adds a mapping of policy names and metadata resolvers.
      Parameters:
      resolvers - resolver mappings
    • setDefaultResolver

      public void setDefaultResolver(IdpMetadataResolver defaultResolver)
      Sets the default resolver to use.
      Parameters:
      defaultResolver - the default metadata resolver
    • afterPropertiesSet

      @PostConstruct public void afterPropertiesSet() throws Exception
      Ensures that all required properties have been assigned.

      Note: If executing in a Spring Framework environment this method is automatically invoked after all properties have been assigned. Otherwise it should be explicitly invoked.

      Throws:
      Exception - if not all settings are correct