Closed tbjers closed 11 years ago
Sounds like we need to switch to a connection string -- shouldn't be too hard to take the config object and generate a URL from it. Could you take a stab at doing that?
Sure thing! What branch do you want me to work in? On Nov 16, 2013 2:45 PM, "Matthew Eernisse" notifications@github.com wrote:
Sounds like we need to switch to a connection string -- shouldn't be too hard to take the config object and generate a URL from it. Could you take a stab at doing that?
— Reply to this email directly or view it on GitHubhttps://github.com/mde/model/issues/114#issuecomment-28634144 .
Release branch (v0.4) -- this is a bugfix.
Tested and fixed in v0.4.3.
Since the MongoDB adapter switched from using
mongodb-wrapper
to the nativemongodb
driver, authentication has stopped working. Theinit
method on the mongodb adapter does not set the authentication properly:http://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html
The MongoDB native library does not support passing in authentication in a hash, and requires a connection string instead.
http://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html
So we need to generate a connect string, or switch back to using mongodb-wrapper.
Any thoughts?
I figured the easiest way to do this would be to supply a
url
parameter with the configuration and use that in.init()