Skip to content

Commit

Permalink
Add more informations to credentials binding
Browse files Browse the repository at this point in the history
* hostname
* name
* username
* password
  • Loading branch information
ggrebert committed Oct 11, 2021
1 parent 9405db3 commit f663cda
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -219,6 +218,11 @@ public String getServerAddresses() {
public Map<String, Object> getCredentialsMap(String database, String username, String password) {

Map<String, Object> 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{
Expand Down

0 comments on commit f663cda

Please sign in to comment.