diff --git a/lib/cradle.js b/lib/cradle.js index 269f1ab..f827c32 100644 --- a/lib/cradle.js +++ b/lib/cradle.js @@ -100,9 +100,6 @@ cradle.Connection = function Connection(/* variable args */) { this.protocol = (this.options.secure) ? 'https' : 'http'; } - if (this.auth && this.auth.user) { // Deprecation warning - console.log('Warning: "user" & "pass" parameters ignored. Use "username" & "password"'); - } if (this.options.ssl) { // Deprecation warning console.log('Warning: "ssl" option is deprecated. Use "secure" instead.'); } @@ -141,7 +138,7 @@ cradle.Connection.prototype.rawRequest = function (options, callback) { // Set HTTP Basic Auth if (this.auth) { - options.headers['Authorization'] = "Basic " + new Buffer(this.auth.username + ':' + this.auth.password).toString('base64'); + options.auth = this.auth; } // Set client-wide headers