Skip to content

Commit 60ad821

Browse files
committed
updates to return credential
1 parent bd7be30 commit 60ad821

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mongodb-driver/src/main/java/org/jnosql/diana/mongodb/document/MongoAuthentication.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ MongoCredential toCredential() {
6868
}
6969

7070

71-
static List<MongoAuthentication> of(Settings settings) {
71+
static List<MongoCredential> of(Settings settings) {
7272

73-
List<MongoAuthentication> authentications = new ArrayList<>();
73+
List<MongoCredential> credentials = new ArrayList<>();
7474

7575
List<String> users = settings.prefix(Arrays.asList(USER.get(),
7676
Configurations.USER.get())).stream()
@@ -96,12 +96,12 @@ static List<MongoAuthentication> of(Settings settings) {
9696
String user = users.get(index);
9797
String password = passwords.get(index);
9898
String source = sources.get(index);
99-
MongoAuthentication authentication = new MongoAuthentication(user,
99+
MongoAuthentication credential = new MongoAuthentication(user,
100100
source, password.toCharArray(), mechanism);
101-
authentications.add(authentication);
101+
credentials.add(credential.toCredential());
102102
}
103103

104-
return authentications;
104+
return credentials;
105105

106106
}
107107
}

0 commit comments

Comments
 (0)