Skip to content

Commit

Permalink
Add a note about MongoDH authentication. See vibe-d#1243.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Sep 13, 2015
1 parent 7a5e536 commit 1238298
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion source/vibe/db/mongo/mongo.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@ import std.algorithm;
of options. Note that 'sslverifycertificate' is only present in some client
bindings, including here.
Note that the returned MongoClient uses a vibe.core.connectionpool.ConnectionPool
internally to create and reuse connections as necessary. Thus, the
MongoClient instance can - and should - be shared among all fibers in a
thread by storing in in a thread local variable.
Authentication:
Authenticated connections are supported by using a URL connection string
such as "mongodb://user:password@host". Note that the driver currently
only supports the "MongoDB-CR" authentication mechanism. Since new
MongoDB versions, starting with 3.0, default to the new "SCRAM-SHA-1"
method, it is necessary to manually switch to the old method. See
$(WEB http://stackoverflow.com/questions/29006887/mongodb-cr-authentication-failed)
for more information.
Examples:
---
// connecting with default settings:
Expand Down

0 comments on commit 1238298

Please sign in to comment.