From f663cda88a45655b29d72f7b19c8553a48756818 Mon Sep 17 00:00:00 2001 From: Geoffrey GREBERT Date: Tue, 13 Jul 2021 12:22:44 +0200 Subject: [PATCH] Add more informations to credentials binding * hostname * name * username * password --- .../servicebroker/mongodb/service/MongoAdminService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mongodb-open-service-broker/src/main/java/org/springframework/cloud/servicebroker/mongodb/service/MongoAdminService.java b/src/mongodb-open-service-broker/src/main/java/org/springframework/cloud/servicebroker/mongodb/service/MongoAdminService.java index 20e525c..cf4b25c 100644 --- a/src/mongodb-open-service-broker/src/main/java/org/springframework/cloud/servicebroker/mongodb/service/MongoAdminService.java +++ b/src/mongodb-open-service-broker/src/main/java/org/springframework/cloud/servicebroker/mongodb/service/MongoAdminService.java @@ -1,7 +1,6 @@ package org.springframework.cloud.servicebroker.mongodb.service; import java.util.Arrays; -import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -219,6 +218,11 @@ public String getServerAddresses() { public Map getCredentialsMap(String database, String username, String password) { Map credentials = new HashMap<>(); + credentials.put("database", (Object) database); + credentials.put("username", (Object) username); + credentials.put("password", (Object) password); + credentials.put("hostname", (Object) this.getServerAddresses()); + if (hamode == false){ credentials.put("uri", (Object) this.getConnectionString(database, username, password)); }else{