diff --git a/lib/jsonrpc.js b/lib/jsonrpc.js index 7b680dd..710d7cd 100644 --- a/lib/jsonrpc.js +++ b/lib/jsonrpc.js @@ -51,8 +51,8 @@ Client.prototype.call = function(method, params, callback, errback, path) { } // use HTTP auth if user and password set - if (this.opts.user && this.opts.pass) { - requestOptions.auth = this.opts.user + ':' + this.opts.pass; + if (this.opts.username && this.opts.password) { + requestOptions.auth = this.opts.username + ':' + this.opts.password; } // Now we'll make a request to the server