Search in sources :

Example 1 with DropwizardMetadataResolverFactory

use of uk.gov.ida.saml.metadata.factories.DropwizardMetadataResolverFactory in project verify-hub by alphagov.

the class SamlProxyModule method getVerifyMetadataResolver.

@Provides
@Singleton
@Named("VerifyMetadataResolver")
public MetadataResolver getVerifyMetadataResolver(Environment environment, SamlProxyConfiguration configuration) {
    final MetadataResolver metadataResolver = new DropwizardMetadataResolverFactory().createMetadataResolver(environment, configuration.getMetadataConfiguration());
    registerMetadataRefreshTask(environment, metadataResolver, configuration.getMetadataConfiguration(), "metadata");
    return metadataResolver;
}
Also used : DropwizardMetadataResolverFactory(uk.gov.ida.saml.metadata.factories.DropwizardMetadataResolverFactory) MetadataResolver(org.opensaml.saml.metadata.resolver.MetadataResolver) AbstractReloadingMetadataResolver(org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 2 with DropwizardMetadataResolverFactory

use of uk.gov.ida.saml.metadata.factories.DropwizardMetadataResolverFactory in project verify-hub by alphagov.

the class SamlEngineModule method getVerifyMetadataResolver.

@Provides
@Singleton
@Named("VerifyMetadataResolver")
private MetadataResolver getVerifyMetadataResolver(Environment environment, SamlEngineConfiguration configuration) {
    final MetadataResolver metadataResolver = new DropwizardMetadataResolverFactory().createMetadataResolver(environment, configuration.getMetadataConfiguration());
    registerMetadataRefreshTask(environment, metadataResolver, configuration.getMetadataConfiguration(), "metadata");
    return metadataResolver;
}
Also used : DropwizardMetadataResolverFactory(uk.gov.ida.saml.metadata.factories.DropwizardMetadataResolverFactory) MetadataResolver(org.opensaml.saml.metadata.resolver.MetadataResolver) AbstractReloadingMetadataResolver(org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

Provides (com.google.inject.Provides)2 Named (javax.inject.Named)2 Singleton (javax.inject.Singleton)2 MetadataResolver (org.opensaml.saml.metadata.resolver.MetadataResolver)2 AbstractReloadingMetadataResolver (org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver)2 DropwizardMetadataResolverFactory (uk.gov.ida.saml.metadata.factories.DropwizardMetadataResolverFactory)2