Class ProfileIdpMetadataResolver
java.lang.Object
se.idsec.signservice.integration.security.impl.ProfileIdpMetadataResolver
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Ensures that all required properties have been assigned.org.opensaml.saml.saml2.metadata.EntityDescriptor
resolveMetadata
(String entityID, IntegrationServiceConfiguration config) Gets the (valid) metadata for the given SAML IdP.void
setDefaultResolver
(IdpMetadataResolver defaultResolver) Sets the default resolver to use.void
setResolvers
(Map<String, IdpMetadataResolver> resolvers) Adds a mapping of policy names and metadata resolvers.
-
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 interfaceIdpMetadataResolver
- Parameters:
entityID
- the entityID for the IdPconfig
- policy configuration- Returns:
- the IdP metadata
- Throws:
MetadataException
- if no valid metadata can be found, or any other error occur
-
setResolvers
Adds a mapping of policy names and metadata resolvers.- Parameters:
resolvers
- resolver mappings
-
setDefaultResolver
Sets the default resolver to use.- Parameters:
defaultResolver
- the default metadata resolver
-
afterPropertiesSet
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
-