[CHORE] vault client: get 2fa HMAC instead of ECDSA

This commit is contained in:
Matthew Fettig
2014-08-25 10:45:43 -07:00
parent c98f875811
commit dbddc314a6
2 changed files with 4 additions and 4 deletions

View File

@@ -527,17 +527,17 @@ BlobObj.prototype.postUpdate = function(op, pointer, params, fn) {
};
/**
* get2FA - ECDSA signed request
* get2FA - HMAC signed request
*/
BlobObj.prototype.get2FA = function (masterkey, fn) {
BlobObj.prototype.get2FA = function (fn) {
var config = {
method : 'GET',
url : this.url + '/v1/blob/' + this.id + '/2FA?device_id=' + this.device_id,
};
var signedRequest = new SignedRequest(config);
var signed = signedRequest.signAsymmetric(masterkey, this.data.account_id, this.id);
var signed = signedRequest.signHmac(this.data.auth_secret, this.id);
request.get(signed.url)
.end(function(err, resp) {

View File

@@ -709,7 +709,7 @@ describe('Blob', function () {
});
it('#2FA_get2FA', function (done) {
blob.get2FA(exampleData.masterkey, function(err, resp) {
blob.get2FA(function(err, resp) {
assert.ifError(err);
assert.strictEqual(typeof resp, 'object');
assert.strictEqual(typeof resp.result, 'string');