builder.add(MongoDBConfiguration.READ_PREFERENCE, mongodbCredentials.getOptions().get(MongoDBConfiguration.READ_PREFERENCE));
builder.add(MongoDBConfiguration.READ_PREFERENCE, mongodbCredentials.getOptions().get(MongoDBConfiguration.READ_PREFERENCE));
&& !mongodbCredentials.getOptions().get("authenticationDatabase").isEmpty()) { mongoDBConfiguration = MongoDBConfiguration.builder() .add("username", mongodbCredentials.getUser()) .add("password", mongodbCredentials.getPassword()) .add("authenticationDatabase", mongodbCredentials.getOptions().get("authenticationDatabase")).build(); logger.debug("MongoDB 'authenticationDatabase' database parameter set to '{}'", mongodbCredentials.getOptions().get("authenticationDatabase")); } else { mongoDBConfiguration = MongoDBConfiguration.builder() .add("username", mongodbCredentials.getUser()) .add("password", mongodbCredentials.getPassword()).build();
&& !mongodbCredentials.getOptions().get("authenticationDatabase").isEmpty()) { mongoDBConfiguration = MongoDBConfiguration.builder() .add("username", mongodbCredentials.getUser()) .add("password", mongodbCredentials.getPassword()) .add("authenticationDatabase", mongodbCredentials.getOptions().get("authenticationDatabase")).build(); logger.debug("MongoDB 'authenticationDatabase' database parameter set to '{}'", mongodbCredentials.getOptions().get("authenticationDatabase")); } else { mongoDBConfiguration = MongoDBConfiguration.builder() .add("username", mongodbCredentials.getUser()) .add("password", mongodbCredentials.getPassword()).build();
configuration.getAdmin().setAlgorithm("HS256"); MongoDBConfiguration mongoDBConfiguration = MongoDBConfiguration.builder() .add("username", configuration.getCatalog().getDatabase().getUser()) .add("password", configuration.getCatalog().getDatabase().getPassword()) .add("authenticationDatabase", configuration.getCatalog().getDatabase().getOptions().get("authenticationDatabase")) .build();