Merge branch 'yads-master'

This commit is contained in:
José F. Romaniello 2014-07-16 20:32:58 -03:00
commit 55d5e43e27
2 changed files with 6 additions and 1 deletions

View File

@ -1,8 +1,12 @@
function UnauthorizedError (code, error) {
Error.call(this, error.message);
this.message = error.message;
this.code = code;
this.inner = error;
this.data = {
message: this.message,
code: code,
type: "UnauthorizedError"
};
}
UnauthorizedError.prototype = Object.create(Error.prototype);

View File

@ -17,6 +17,7 @@ describe('authorizer', function () {
socket.on('error', function(err){
err.should.eql("jwt malformed");
err.code.should.eql("invalid_token");
done();
});
});