use of com.google.inject.Provides 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;
}
use of com.google.inject.Provides in project verify-hub by alphagov.
the class SamlEngineModule method jsonClient.
@Provides
@Singleton
private JsonClient jsonClient(JsonResponseProcessor jsonResponseProcessor, Environment environment, SamlEngineConfiguration configuration) {
Client client = new ClientProvider(environment, configuration.getJerseyClientConfiguration(), configuration.getEnableRetryTimeOutConnections(), "samlEngineClient").get();
ErrorHandlingClient errorHandlingClient = new ErrorHandlingClient(client);
return new JsonClient(errorHandlingClient, jsonResponseProcessor);
}
use of com.google.inject.Provides in project verify-hub by alphagov.
the class SamlEngineModule method getAES256WithGCMAssertionDecrypter.
@Provides
@Named("AES256DecrypterWithGCM")
private AssertionDecrypter getAES256WithGCMAssertionDecrypter(IdaKeyStore keyStore) {
IdaKeyStoreCredentialRetriever idaKeyStoreCredentialRetriever = new IdaKeyStoreCredentialRetriever(keyStore);
Decrypter decrypter = new DecrypterFactory().createDecrypter(idaKeyStoreCredentialRetriever.getDecryptingCredentials());
return new AssertionDecrypter(new EncryptionAlgorithmValidator(ImmutableSet.of(EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256, EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256_GCM)), decrypter);
}
use of com.google.inject.Provides in project verify-hub by alphagov.
the class PolicyModule method jsonClient.
@Provides
@Singleton
public JsonClient jsonClient(JsonResponseProcessor jsonResponseProcessor, Environment environment, PolicyConfiguration configuration) {
Client client = new ClientProvider(environment, configuration.getJerseyClientConfiguration(), configuration.getEnableRetryTimeOutConnections(), "policyClient").get();
ErrorHandlingClient errorHandlingClient = new ErrorHandlingClient(client);
return new JsonClient(errorHandlingClient, jsonResponseProcessor);
}
use of com.google.inject.Provides in project openremote by openremote.
the class ManagerModule method getHistoryHandler.
@Provides
@Singleton
public PlaceHistoryHandler getHistoryHandler(PlaceController placeController, PlaceHistoryMapper historyMapper, com.google.web.bindery.event.shared.EventBus legacyEventBus) {
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
// TODO See AppPlaceController for default start page
historyHandler.register(placeController, legacyEventBus, Place.NOWHERE);
return historyHandler;
}
Aggregations