use of uk.gov.ida.saml.metadata.MetadataHealthCheck in project verify-hub by alphagov.
the class SamlEngineModule method getVerifyMetadataHealthCheck.
@Provides
@Singleton
@Named(VERIFY_METADATA_HEALTH_CHECK)
private MetadataHealthCheck getVerifyMetadataHealthCheck(@Named("VerifyMetadataResolver") MetadataResolver metadataResolver, Environment environment, SamlEngineConfiguration configuration) {
MetadataHealthCheck metadataHealthCheck = new MetadataHealthCheck(metadataResolver, configuration.getMetadataConfiguration().getExpectedEntityId());
environment.healthChecks().register(VERIFY_METADATA_HEALTH_CHECK, metadataHealthCheck);
return metadataHealthCheck;
}
use of uk.gov.ida.saml.metadata.MetadataHealthCheck in project verify-hub by alphagov.
the class SamlProxyModule method getCountryMetadataHealthCheck.
@Provides
@Singleton
@Named(COUNTRY_METADATA_HEALTH_CHECK)
public Optional<MetadataHealthCheck> getCountryMetadataHealthCheck(@Named("CountryMetadataResolver") Optional<MetadataResolver> metadataResolver, Environment environment, SamlProxyConfiguration configuration) {
return metadataResolver.map(resolver -> {
MetadataHealthCheck metadataHealthCheck = new MetadataHealthCheck(metadataResolver.get(), configuration.getCountryConfiguration().get().getMetadataConfiguration().getExpectedEntityId());
environment.healthChecks().register(COUNTRY_METADATA_HEALTH_CHECK, metadataHealthCheck);
return metadataHealthCheck;
});
}
use of uk.gov.ida.saml.metadata.MetadataHealthCheck in project verify-hub by alphagov.
the class SamlProxyModule method getVerifyMetadataHealthCheck.
@Provides
@Singleton
@Named(VERIFY_METADATA_HEALTH_CHECK)
public MetadataHealthCheck getVerifyMetadataHealthCheck(@Named("VerifyMetadataResolver") MetadataResolver metadataResolver, Environment environment, SamlProxyConfiguration configuration) {
MetadataHealthCheck metadataHealthCheck = new MetadataHealthCheck(metadataResolver, configuration.getMetadataConfiguration().getExpectedEntityId());
environment.healthChecks().register(VERIFY_METADATA_HEALTH_CHECK, metadataHealthCheck);
return metadataHealthCheck;
}
Aggregations