From dcaf8476a74c7a9378d977e4b878a6f2f22497f6 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 | 5 +++++ 1 file changed, 5 insertions(+) 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..f9aea50 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 @@ -219,6 +219,11 @@ public String getServerAddresses() { public Map getCredentialsMap(String database, String username, String password) { Map credentials = new HashMap<>(); + credentials.put("name", (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{