Permalink
Browse files

add token auth to node-smartdc

  • Loading branch information...
1 parent 2c93cb6 commit 7b08db8fec35ca52d75b4a7392f323f7b0034c5a @JohnSonnenschein JohnSonnenschein committed Jan 17, 2013
Showing with 3 additions and 4 deletions.
  1. +2 −3 lib/cloudapi.js
  2. +1 −1 package.json
View
@@ -18,8 +18,7 @@ var log = bunyan.createLogger({
stream: process.stderr,
serializers: {
err: bunyan.stdSerializers.err,
- req: bunyan.stdSerializers.req,
- res: restify.bunyan.serializers.response
+ req: bunyan.stdSerializers.req
}
});
var RestCodes = restify.RestCodes;
@@ -2101,7 +2100,7 @@ CloudAPI.prototype._request = function (path, body, callback) {
if (this.basicAuth) {
self.client.basicAuth(self.options.username, self.options.password);
} else {
- if (this.token)
+ if (this.token != undefined)
obj.headers["X-Auth-Token"] = this.token;
if (!this.sshAgent) {
var alg = / DSA /.test(this.key) ? 'DSA-SHA1' : 'RSA-SHA256';
View
@@ -22,7 +22,7 @@
"lru-cache": "1.1.0",
"nopt": "1.0.10",
"restify": "1.4.3",
- "bunyan": "0.8.0",
+ "bunyan": ">0.8.0",
"ssh-agent": "0.1.0"
},
"devDependencies": {}

0 comments on commit 7b08db8

Please sign in to comment.