Skip to content

Commit

Permalink
Merge pull request #32 from swedenconnect/bugfix/IS-31-no-metadata-bean
Browse files Browse the repository at this point in the history
IS-31 Fixed bug when there are more than one provider configured
  • Loading branch information
martin-lindstrom authored Sep 13, 2023
2 parents 11ad93a + 99c8b7b commit d7bbc80
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@

/**
* Configuration class that ensures that we have a {@link MetadataResolver} bean.
*
*
* @author Martin Lindström
*/
@Configuration
@EnableConfigurationProperties(IdentityProviderConfigurationProperties.class)
public class MetadataResolverConfiguration {

@Setter
@Autowired(required = false)
private IdentityProviderConfigurationProperties properties;

@ConditionalOnMissingBean(name = "saml.idp.metadata.Provider")
@Bean("saml.idp.metadata.Provider")
MetadataResolver metadataResolver() {
Expand All @@ -50,7 +50,7 @@ MetadataResolver metadataResolver() {
new MetadataProviderSettings[this.properties.getMetadataProviders().size()];
int pos = 0;
for (final MetadataProviderConfigurationProperties p : this.properties.getMetadataProviders()) {
settings[pos] = MetadataProviderSettings.builder()
settings[pos++] = MetadataProviderSettings.builder()
.location(p.getLocation())
.backupLocation(p.getBackupLocation())
.mdq(p.getMdq())
Expand Down

0 comments on commit d7bbc80

Please sign in to comment.