Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
jsHint and whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
geek committed Nov 14, 2012
1 parent 9f4b66e commit e337ef9
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 34 deletions.
2 changes: 1 addition & 1 deletion client/oz.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Oz.macMessage = function (message, ticket) {
// Sign normalized request string

return Crypto.util.bytesToBase64(Crypto.HMAC(hashFunc, Oz.internals.utf8Encode(message), ticket.key, { asBytes: true }));
}
};


// Escape header attribute value
Expand Down
6 changes: 1 addition & 5 deletions lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,4 @@ exports.unseal = function (sealed, encryptionPassword, options, callback) {
return callback(null, object);
});
});
};




};
2 changes: 1 addition & 1 deletion lib/endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,4 @@ internals.basicAuth = function (req) {

var credentials = new Buffer(parts[1], 'base64').toString().split(':');
return { username: credentials[0], password: credentials[1] };
};
};
5 changes: 1 addition & 4 deletions lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,4 @@ internals.Error.internal = function (message, data) {
err.trace = Utils.callStack(1);
err.data = data;
return err;
};



};
3 changes: 1 addition & 2 deletions lib/oz.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ internals.export = function () {
}
};

internals.export();

internals.export();
9 changes: 3 additions & 6 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
var Url = require('url');
var Crypto = require('./crypto');
var Ticket = require('./ticket');
var Settings = require('./settings')
var Utils = require('./utils')
var Settings = require('./settings');
var Utils = require('./utils');
var Err = require('./error');


Expand Down Expand Up @@ -241,7 +241,4 @@ exports.generateHeader = function (request, ticket, attributes) {
var mac = exports.mac(request, ticket, attributes);
var header = exports.formatHeader(attributes, ticket.id, ticket.app, mac);
return header;
};



};
4 changes: 1 addition & 3 deletions lib/rsvp.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,4 @@ exports.parse = function (rsvp, encryptionPassword, callback) {
Utils.toss(encryptionPassword, Err.internal('Invalid encryption password'), callback);

Crypto.unseal(rsvp, encryptionPassword, Settings.ticket, callback);
};


};
3 changes: 1 addition & 2 deletions lib/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ exports.isSubset = function (scope, subset) {

var common = Utils.intersect(scope, subset);
return common.length === subset.length;
};

};
5 changes: 2 additions & 3 deletions lib/settings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Load modules

var Utils = require('./utils')
var Utils = require('./utils');


// Declare internals
Expand Down Expand Up @@ -52,5 +52,4 @@ exports.set = function (arg1, arg2) { // (group, settings) OR (tree)
Utils.assert(['ticket'].indexOf(group) !== -1, 'Unknown settings group: ' + group);
Utils.merge(exports[group], settings[group]);
}
};

};
6 changes: 2 additions & 4 deletions lib/ticket.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ exports.issue = function (app, grant, encryptionPassword, options, callback) {
}

if (options.ext) {
envelope.ext = options.ext
envelope.ext = options.ext;
}

exports.generate(envelope, encryptionPassword, callback);
Expand Down Expand Up @@ -184,6 +184,4 @@ exports.parse = function (id, encryptionPassword, callback) {
ticket.id = id;
return callback(null, ticket);
});
};


};
6 changes: 3 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var internals = {};

// Import Hoek Utilities

internals.import = function () {
internals.importHoek = function () {

for (var i in Hoek) {
if (Hoek.hasOwnProperty(i)) {
Expand All @@ -20,7 +20,7 @@ internals.import = function () {
}
};

internals.import();
internals.importHoek();


// oz version
Expand Down Expand Up @@ -57,4 +57,4 @@ exports.base64urlDecode = function (encoded) {
exports.escapeHeaderAttribute = function (attribute) {

return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"');
};
};

0 comments on commit e337ef9

Please sign in to comment.