use of com.sanction.thunder.dynamodb.DynamoDbModule in project thunder by RohanNagar.
the class ThunderApplication method run.
@Override
public void run(ThunderConfiguration config, Environment env) {
ThunderComponent component = DaggerThunderComponent.builder().daoModule(new DaoModule()).dynamoDbModule(new DynamoDbModule(config.getDynamoConfiguration())).emailModule(new EmailModule(config.getEmailConfiguration())).thunderModule(new ThunderModule(env.metrics(), config)).build();
// Authentication
env.jersey().register(new AuthDynamicFeature(new BasicCredentialAuthFilter.Builder<Key>().setAuthenticator(component.getThunderAuthenticator()).setRealm("THUNDER - AUTHENTICATION").buildAuthFilter()));
env.jersey().register(new AuthValueFactoryProvider.Binder<>(Key.class));
// HealthChecks
env.healthChecks().register("DynamoDB", component.getDynamoDbHealthCheck());
// Resources
env.jersey().register(component.getUserResource());
env.jersey().register(component.getVerificationResource());
}
Aggregations