grunt-couchapp/lib/auth.js

12 lines
331 B
JavaScript
Raw Normal View History

2013-08-22 03:54:28 +00:00
exports.getCookie = function(opts, cb){
var db = nano(opts.db.url);
nano.auth(opts.username, opts.password, function(err, body, headers){
if(err){
cb(err);
}else{
if(headers && headers['set-cookie']){
cb(null, headers['set-cookie']);
}
}
});
}