You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/content/driver-async/tutorials/authentication.md
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,19 +23,9 @@ An authentication credential is represented as an instance of the
23
23
[`MongoCredential`]({{< apiref "com/mongodb/MongoCredential" >}}) class. The [`MongoCredential`]({{<apiref "com/mongodb/MongoCredential.html">}}) class includes static
24
24
factory methods for each of the supported authentication mechanisms.
25
25
26
-
To specify a list of these instances, use the [`MongoClientSettings`]({{< apiref "com/mongodb/async/client/MongoClientSettings" >}}) and pass as a parameter to the
- You can also specify the credential with a string that specifies the connection URI and pass the string to the [`MongoClients.create()`]({{< apiref "com/mongodb/async/client/MongoClients.html#create-java.lang.String-" >}}) method that takes the connection string as a parameter. For brevity, the tutorial omits the examples using the string.
35
-
36
-
- Given the flexibility of role-based access control in MongoDB, it is usually sufficient to authenticate with a single user, but, for completeness, the driver accepts a list of credentials.
37
-
{{% /note %}}
38
-
39
29
## Default Authentication Mechanism
40
30
41
31
Starting in MongoDB 3.0, MongoDB changed the default authentication
Copy file name to clipboardExpand all lines: docs/reference/content/driver/tutorials/authentication.md
+9-20Lines changed: 9 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,8 @@ An authentication credential is represented as an instance of the
23
23
[`MongoCredential`]({{<apiref "com/mongodb/MongoCredential.html">}}) class. The [`MongoCredential`]({{<apiref "com/mongodb/MongoCredential.html">}}) class includes static
24
24
factory methods for each of the supported authentication mechanisms.
25
25
26
-
To specify a list of these instances, use one of
27
-
several [`MongoClient()`]({{< apiref "com/mongodb/MongoClient.html">}}) constructors that take a parameter of type
28
-
`List <MongoCredential>`.
29
-
30
-
To specify a single `MongoCredential`, you can also use a [`MongoClientURI`]({{< apiref "/com/mongodb/MongoClientURI.html">}}) and pass it to a [`MongoClient()`]({{< apiref "com/mongodb/MongoClient.html">}}) constructor that takes a `MongoClientURI` parameter.
31
-
32
-
{{% note %}}
33
-
Given the flexibility of role-based access control in MongoDB, it is
34
-
usually sufficient to authenticate with a single user, but, for
35
-
completeness, the driver accepts a list of credentials.
36
-
{{% /note %}}
26
+
You can also use a [`MongoClientURI`]({{< apiref "/com/mongodb/MongoClientURI.html">}}) and pass it to a
27
+
[`MongoClient()`]({{< apiref "com/mongodb/MongoClient.html">}}) constructor that takes a `MongoClientURI` parameter.
37
28
38
29
## Default Authentication Mechanism
39
30
@@ -52,8 +43,7 @@ String database; // the name of the database in which the user is defined
52
43
char[] password; // the password as a character array
0 commit comments