balderdashy/sails-mongo — pull request #206 by aaronransley (2014-11-14 19:50:14+00:00)
Title: Support for uri_decode_auth in MongoClient connections

Adds support for encoded usernames and passwords in config.connections objects. Add `uri_decode_auth: true` to your connection to enable.

example: '''config/env/development.js'''
```javascript
module.exports = {

models: {
connection: 'mongoDb'
},

connections: {
mongoDb: {
adapter: 'sails-mongo',
host: 'localhost',
port: 27017,
database: 'yourDb'

// Possible to add encoded symbols to the user as well
user: 'yourUser',

// Replacing @ with %40 to ensure connection string integrity
password: 'your%40%40Pass', // will decode to: your@@Pass

// New option to tell the underlying MongoClient#connect call
// that we've got credentials that need decoding
uri_decode_auth: true,
}
}
}
```