From 1238298551e6715c596de55713af7c8f94ceb475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sun, 13 Sep 2015 21:59:27 +0200 Subject: [PATCH] Add a note about MongoDH authentication. See #1243. --- source/vibe/db/mongo/mongo.d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/vibe/db/mongo/mongo.d b/source/vibe/db/mongo/mongo.d index 58f223ec48..c4f0f1b27d 100644 --- a/source/vibe/db/mongo/mongo.d +++ b/source/vibe/db/mongo/mongo.d @@ -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: