Search in sources :

Example 1 with MetadataHealthCheck

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;
}
Also used : MetadataHealthCheck(uk.gov.ida.saml.metadata.MetadataHealthCheck) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 2 with 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;
    });
}
Also used : MetadataHealthCheck(uk.gov.ida.saml.metadata.MetadataHealthCheck) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 3 with 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;
}
Also used : MetadataHealthCheck(uk.gov.ida.saml.metadata.MetadataHealthCheck) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

Provides (com.google.inject.Provides)3 Named (javax.inject.Named)3 Singleton (javax.inject.Singleton)3 MetadataHealthCheck (uk.gov.ida.saml.metadata.MetadataHealthCheck)3