fsevents 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/Readme.md +12 -13
- package/node_modules/ansi/package.json +1 -2
- package/node_modules/are-we-there-yet/package.json +1 -2
- package/node_modules/asn1/.travis.yml +4 -0
- package/node_modules/asn1/lib/ber/reader.js +27 -33
- package/node_modules/asn1/lib/ber/writer.js +10 -11
- package/node_modules/asn1/package.json +21 -19
- package/node_modules/asn1/tst/ber/reader.test.js +36 -0
- package/node_modules/asn1/tst/ber/writer.test.js +74 -0
- package/node_modules/assert-plus/package.json +1 -0
- package/node_modules/{ctype → bl/node_modules/readable-stream/node_modules/core-util-is}/LICENSE +1 -6
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/boom/package.json +1 -1
- package/node_modules/commander/package.json +1 -1
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/core-util-is/package.json +17 -12
- package/node_modules/core-util-is/test.js +68 -0
- package/node_modules/dashdash/README.md +508 -0
- package/node_modules/dashdash/lib/dashdash.js +813 -0
- package/node_modules/dashdash/package.json +87 -0
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +89 -52
- package/node_modules/deep-extend/index.js +1 -90
- package/node_modules/deep-extend/lib/deep-extend.js +144 -0
- package/node_modules/deep-extend/package.json +47 -16
- package/node_modules/deep-extend/test/index.spec.js +168 -5
- package/node_modules/delegates/package.json +1 -2
- package/node_modules/ecc-jsbn/.npmignore +15 -0
- package/node_modules/ecc-jsbn/LICENSE +21 -0
- package/node_modules/ecc-jsbn/README.md +8 -0
- package/node_modules/ecc-jsbn/index.js +57 -0
- package/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- package/node_modules/ecc-jsbn/lib/ec.js +561 -0
- package/node_modules/ecc-jsbn/lib/sec.js +170 -0
- package/node_modules/ecc-jsbn/package.json +63 -0
- package/node_modules/ecc-jsbn/test.js +14 -0
- package/node_modules/extsprintf/.gitmodules +6 -0
- package/node_modules/{path-is-absolute/license → extsprintf/LICENSE} +2 -4
- package/node_modules/extsprintf/Makefile +23 -0
- package/node_modules/extsprintf/Makefile.deps +39 -0
- package/node_modules/extsprintf/Makefile.targ +285 -0
- package/node_modules/extsprintf/README.md +39 -0
- package/node_modules/extsprintf/examples/simple.js +2 -0
- package/node_modules/{ctype/tools/jsl.conf → extsprintf/jsl.node.conf} +71 -63
- package/node_modules/extsprintf/lib/extsprintf.js +166 -0
- package/node_modules/extsprintf/package.json +48 -0
- package/node_modules/fstream/package.json +1 -2
- package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/package.json +4 -22
- package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/package.json +3 -21
- package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/package.json +4 -23
- package/node_modules/fstream-ignore/node_modules/minimatch/package.json +4 -24
- package/node_modules/fstream-ignore/package.json +1 -2
- package/node_modules/gauge/package.json +1 -2
- package/node_modules/har-validator/package.json +15 -15
- package/node_modules/has-unicode/package.json +1 -2
- package/node_modules/hawk/dist/client.js +340 -0
- package/node_modules/hawk/lib/browser.js +14 -20
- package/node_modules/hawk/package.json +10 -10
- package/node_modules/hawk/test/browser.js +134 -101
- package/node_modules/hawk/test/index.js +61 -61
- package/node_modules/hawk/test/server.js +72 -84
- package/node_modules/hawk/test/uri.js +52 -63
- package/node_modules/http-signature/CHANGES.md +39 -0
- package/node_modules/http-signature/http_signing.md +16 -17
- package/node_modules/http-signature/lib/index.js +6 -4
- package/node_modules/http-signature/lib/parser.js +43 -29
- package/node_modules/http-signature/lib/signer.js +290 -74
- package/node_modules/http-signature/lib/utils.js +112 -0
- package/node_modules/http-signature/lib/verify.js +47 -15
- package/node_modules/http-signature/package.json +20 -14
- package/node_modules/is-my-json-valid/index.js +16 -14
- package/node_modules/is-my-json-valid/package.json +16 -12
- package/node_modules/is-typedarray/LICENSE.md +18 -0
- package/node_modules/is-typedarray/README.md +16 -0
- package/node_modules/is-typedarray/index.js +41 -0
- package/node_modules/is-typedarray/package.json +63 -0
- package/node_modules/is-typedarray/test.js +34 -0
- package/node_modules/jodid25519/.npmignore +11 -0
- package/node_modules/jodid25519/.travis.yml +7 -0
- package/node_modules/jodid25519/AUTHORS.md +3 -0
- package/node_modules/jodid25519/LICENSE +23 -0
- package/node_modules/jodid25519/README.md +51 -0
- package/node_modules/jodid25519/almond.0 +42 -0
- package/node_modules/jodid25519/almond.1 +13 -0
- package/node_modules/jodid25519/index.js +35 -0
- package/node_modules/jodid25519/jsdoc.json +19 -0
- package/node_modules/jodid25519/lib/core.js +481 -0
- package/node_modules/jodid25519/lib/curve255.js +221 -0
- package/node_modules/jodid25519/lib/dh.js +111 -0
- package/node_modules/jodid25519/lib/eddsa.js +573 -0
- package/node_modules/jodid25519/lib/utils.js +198 -0
- package/node_modules/jodid25519/package.json +77 -0
- package/node_modules/jsbn/.npmignore +2 -0
- package/node_modules/jsbn/LICENSE +40 -0
- package/node_modules/jsbn/README.md +175 -0
- package/node_modules/jsbn/example.html +12 -0
- package/node_modules/jsbn/example.js +3 -0
- package/node_modules/jsbn/index.js +1358 -0
- package/node_modules/jsbn/package.json +60 -0
- package/node_modules/json-schema/README.md +5 -0
- package/node_modules/json-schema/draft-00/hyper-schema +68 -0
- package/node_modules/json-schema/draft-00/json-ref +26 -0
- package/node_modules/json-schema/draft-00/links +33 -0
- package/node_modules/json-schema/draft-00/schema +155 -0
- package/node_modules/json-schema/draft-01/hyper-schema +68 -0
- package/node_modules/json-schema/draft-01/json-ref +26 -0
- package/node_modules/json-schema/draft-01/links +33 -0
- package/node_modules/json-schema/draft-01/schema +155 -0
- package/node_modules/json-schema/draft-02/hyper-schema +68 -0
- package/node_modules/json-schema/draft-02/json-ref +26 -0
- package/node_modules/json-schema/draft-02/links +35 -0
- package/node_modules/json-schema/draft-02/schema +166 -0
- package/node_modules/json-schema/draft-03/examples/address +20 -0
- package/node_modules/json-schema/draft-03/examples/calendar +53 -0
- package/node_modules/json-schema/draft-03/examples/card +105 -0
- package/node_modules/json-schema/draft-03/examples/geo +8 -0
- package/node_modules/json-schema/draft-03/examples/interfaces +23 -0
- package/node_modules/json-schema/draft-03/hyper-schema +60 -0
- package/node_modules/json-schema/draft-03/json-ref +26 -0
- package/node_modules/json-schema/draft-03/links +35 -0
- package/node_modules/json-schema/draft-03/schema +174 -0
- package/node_modules/json-schema/draft-04/hyper-schema +60 -0
- package/node_modules/json-schema/draft-04/links +41 -0
- package/node_modules/json-schema/draft-04/schema +189 -0
- package/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
- package/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
- package/node_modules/json-schema/lib/links.js +52 -0
- package/node_modules/json-schema/lib/validate.js +260 -0
- package/node_modules/json-schema/package.json +67 -0
- package/node_modules/json-schema/test/tests.js +95 -0
- package/node_modules/jsprim/CHANGES.md +30 -0
- package/node_modules/jsprim/LICENSE +19 -0
- package/node_modules/jsprim/README.md +228 -0
- package/node_modules/jsprim/lib/jsprim.js +478 -0
- package/node_modules/jsprim/package.json +54 -0
- package/node_modules/lodash._basetostring/package.json +1 -2
- package/node_modules/lodash._createpadding/package.json +1 -2
- package/node_modules/lodash.pad/package.json +1 -2
- package/node_modules/lodash.padleft/package.json +1 -2
- package/node_modules/lodash.padright/package.json +1 -2
- package/node_modules/lodash.repeat/package.json +1 -2
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/README.md +570 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +4 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +2 -1
- package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/package.json +30 -37
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +37 -57
- package/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js +22 -0
- package/node_modules/node-pre-gyp/package.json +17 -17
- package/node_modules/node-uuid/.npmignore +2 -0
- package/node_modules/node-uuid/README.md +12 -1
- package/node_modules/node-uuid/bower.json +1 -1
- package/node_modules/node-uuid/component.json +11 -4
- package/node_modules/node-uuid/package.json +25 -12
- package/node_modules/node-uuid/test/test.js +3 -0
- package/node_modules/node-uuid/uuid.js +70 -45
- package/node_modules/npmlog/.travis.yml +14 -0
- package/node_modules/npmlog/log.js +3 -0
- package/node_modules/npmlog/package.json +23 -20
- package/node_modules/npmlog/test/basic.js +8 -1
- package/node_modules/once/package.json +2 -3
- package/node_modules/pinkie/index.js +23 -7
- package/node_modules/pinkie/package.json +22 -15
- package/node_modules/pinkie/readme.md +17 -9
- package/node_modules/pinkie-promise/package.json +16 -14
- package/node_modules/pinkie-promise/readme.md +5 -3
- package/node_modules/rc/README.md +1 -1
- package/node_modules/rc/index.js +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/request/.eslintrc +1 -1
- package/node_modules/request/.travis.yml +4 -4
- package/node_modules/request/CHANGELOG.md +25 -0
- package/node_modules/request/README.md +12 -13
- package/node_modules/request/lib/har.js +84 -75
- package/node_modules/request/lib/redirect.js +2 -3
- package/node_modules/request/lib/tunnel.js +13 -18
- package/node_modules/request/package.json +17 -16
- package/node_modules/request/request.js +16 -59
- package/node_modules/rimraf/README.md +7 -2
- package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/package.json +5 -25
- package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/package.json +5 -25
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +42 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +25 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
- package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/package.json +3 -21
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
- package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/package.json +4 -22
- package/node_modules/rimraf/node_modules/glob/package.json +2 -20
- package/node_modules/rimraf/package.json +10 -10
- package/node_modules/semver/README.md +25 -1
- package/node_modules/semver/package.json +10 -10
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/semver.js +0 -12
- package/node_modules/sshpk/.npmignore +8 -0
- package/node_modules/sshpk/.travis.yml +11 -0
- package/node_modules/sshpk/LICENSE +18 -0
- package/node_modules/sshpk/README.md +436 -0
- package/node_modules/sshpk/bin/sshpk-conv +183 -0
- package/node_modules/sshpk/lib/algs.js +168 -0
- package/node_modules/sshpk/lib/dhe.js +312 -0
- package/node_modules/sshpk/lib/ed-compat.js +94 -0
- package/node_modules/sshpk/lib/errors.js +58 -0
- package/node_modules/sshpk/lib/fingerprint.js +140 -0
- package/node_modules/sshpk/lib/formats/auto.js +73 -0
- package/node_modules/sshpk/lib/formats/pem.js +152 -0
- package/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
- package/node_modules/sshpk/lib/formats/pkcs8.js +510 -0
- package/node_modules/sshpk/lib/formats/rfc4253.js +145 -0
- package/node_modules/sshpk/lib/formats/ssh-private.js +138 -0
- package/node_modules/sshpk/lib/formats/ssh.js +114 -0
- package/node_modules/sshpk/lib/index.js +25 -0
- package/node_modules/sshpk/lib/key.js +260 -0
- package/node_modules/sshpk/lib/private-key.js +224 -0
- package/node_modules/sshpk/lib/signature.js +237 -0
- package/node_modules/sshpk/lib/ssh-buffer.js +123 -0
- package/node_modules/sshpk/lib/utils.js +207 -0
- package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +8 -0
- package/node_modules/sshpk/node_modules/assert-plus/README.md +155 -0
- package/node_modules/sshpk/node_modules/assert-plus/assert.js +206 -0
- package/node_modules/sshpk/node_modules/assert-plus/package.json +88 -0
- package/node_modules/sshpk/package.json +92 -0
- package/node_modules/strip-json-comments/cli.js +2 -2
- package/node_modules/strip-json-comments/package.json +13 -12
- package/node_modules/strip-json-comments/readme.md +11 -5
- package/node_modules/strip-json-comments/strip-json-comments.js +16 -7
- package/node_modules/tar/package.json +1 -2
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/tar-pack/node_modules/rimraf/package.json +1 -2
- package/node_modules/tar-pack/package.json +1 -2
- package/node_modules/tough-cookie/lib/cookie.js +1 -1
- package/node_modules/tough-cookie/package.json +7 -7
- package/node_modules/tweetnacl/.npmignore +4 -0
- package/node_modules/tweetnacl/CHANGELOG.md +128 -0
- package/node_modules/tweetnacl/README.md +463 -0
- package/node_modules/tweetnacl/nacl-fast.js +2418 -0
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- package/node_modules/tweetnacl/nacl.js +1205 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -0
- package/node_modules/tweetnacl/package.json +101 -0
- package/node_modules/uid-number/package.json +2 -3
- package/node_modules/verror/.gitmodules +0 -0
- package/node_modules/verror/LICENSE +19 -0
- package/node_modules/verror/Makefile +35 -0
- package/node_modules/verror/Makefile.targ +285 -0
- package/node_modules/verror/README.md +120 -0
- package/node_modules/verror/examples/levels-verror.js +36 -0
- package/node_modules/verror/examples/levels-werror.js +34 -0
- package/node_modules/verror/examples/varargs.js +6 -0
- package/node_modules/verror/examples/verror.js +13 -0
- package/node_modules/verror/examples/werror.js +14 -0
- package/node_modules/verror/jsl.node.conf +139 -0
- package/node_modules/verror/lib/verror.js +157 -0
- package/node_modules/verror/package.json +51 -0
- package/node_modules/verror/tests/tst.inherit.js +100 -0
- package/node_modules/verror/tests/tst.verror.js +156 -0
- package/node_modules/verror/tests/tst.werror.js +179 -0
- package/package.json +3 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/core-util-is/util.js +0 -106
- package/node_modules/ctype/.npmignore +0 -1
- package/node_modules/ctype/CHANGELOG +0 -78
- package/node_modules/ctype/README +0 -82
- package/node_modules/ctype/README.old +0 -298
- package/node_modules/ctype/ctf.js +0 -245
- package/node_modules/ctype/ctio.js +0 -1485
- package/node_modules/ctype/ctype.js +0 -944
- package/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
- package/node_modules/ctype/package.json +0 -51
- package/node_modules/ctype/tools/jsstyle +0 -839
- package/node_modules/http-signature/lib/util.js +0 -306
- package/node_modules/inflight/node_modules/once/package.json +0 -86
- package/node_modules/inflight/node_modules/once/test/once.js +0 -23
- package/node_modules/rimraf/node_modules/glob/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/README.md +0 -51
- package/node_modules/rimraf/node_modules/once/once.js +0 -21
- package/node_modules/rimraf/node_modules/once/package.json +0 -84
- package/node_modules/rimraf/node_modules/once/test/once.js +0 -23
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/wrappy/LICENSE +0 -15
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/.npmignore +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/README.md +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/example.js +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.npmignore +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/LICENSE.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/Makefile +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/README.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/example.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/test/balanced.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/LICENSE +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/README.markdown +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/example/map.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/index.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/test/map.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.npmignore +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.travis.yml +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/CONTRIBUTING.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/LICENSE +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/README.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/abbrev.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/test.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/.eslintrc +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/README.md +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/inflight.js +0 -0
- /package/node_modules/{fstream-ignore/node_modules/minimatch → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/README.md +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/test/basic.js +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/wrappy.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/test.js +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/README.md +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/minimatch.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/README.md +0 -0
- /package/node_modules/{inflight/node_modules/once → rimraf/node_modules/glob/node_modules/once/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/once.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/index.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/readme.md +0 -0
- /package/node_modules/{deep-extend → verror}/.npmignore +0 -0
@@ -28,7 +28,7 @@ describe('Uri', function () {
|
|
28
28
|
var credentials = {
|
29
29
|
id: id,
|
30
30
|
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
31
|
-
algorithm: 'sha256',
|
31
|
+
algorithm: (id === '1' ? 'sha1' : 'sha256'),
|
32
32
|
user: 'steve'
|
33
33
|
};
|
34
34
|
|
@@ -44,15 +44,15 @@ describe('Uri', function () {
|
|
44
44
|
port: 80
|
45
45
|
};
|
46
46
|
|
47
|
-
credentialsFunc('123456', function (err,
|
47
|
+
credentialsFunc('123456', function (err, credentials1) {
|
48
48
|
|
49
|
-
var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials:
|
49
|
+
var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
|
50
50
|
req.url += '&bewit=' + bewit;
|
51
51
|
|
52
|
-
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err,
|
52
|
+
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
|
53
53
|
|
54
54
|
expect(err).to.not.exist();
|
55
|
-
expect(
|
55
|
+
expect(credentials2.user).to.equal('steve');
|
56
56
|
expect(attributes.ext).to.equal('some-app-data');
|
57
57
|
done();
|
58
58
|
});
|
@@ -68,15 +68,15 @@ describe('Uri', function () {
|
|
68
68
|
port: 80
|
69
69
|
};
|
70
70
|
|
71
|
-
credentialsFunc('123456', function (err,
|
71
|
+
credentialsFunc('123456', function (err, credentials1) {
|
72
72
|
|
73
|
-
var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials:
|
73
|
+
var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100 });
|
74
74
|
req.url += '&bewit=' + bewit;
|
75
75
|
|
76
|
-
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err,
|
76
|
+
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
|
77
77
|
|
78
78
|
expect(err).to.not.exist();
|
79
|
-
expect(
|
79
|
+
expect(credentials2.user).to.equal('steve');
|
80
80
|
done();
|
81
81
|
});
|
82
82
|
});
|
@@ -156,7 +156,7 @@ describe('Uri', function () {
|
|
156
156
|
|
157
157
|
it('should fail on method other than GET', function (done) {
|
158
158
|
|
159
|
-
credentialsFunc('123456', function (err,
|
159
|
+
credentialsFunc('123456', function (err, credentials1) {
|
160
160
|
|
161
161
|
var req = {
|
162
162
|
method: 'POST',
|
@@ -167,7 +167,7 @@ describe('Uri', function () {
|
|
167
167
|
|
168
168
|
var exp = Math.floor(Hawk.utils.now() / 1000) + 60;
|
169
169
|
var ext = 'some-app-data';
|
170
|
-
var mac = Hawk.crypto.calculateMac('bewit',
|
170
|
+
var mac = Hawk.crypto.calculateMac('bewit', credentials1, {
|
171
171
|
timestamp: exp,
|
172
172
|
nonce: '',
|
173
173
|
method: req.method,
|
@@ -177,11 +177,11 @@ describe('Uri', function () {
|
|
177
177
|
ext: ext
|
178
178
|
});
|
179
179
|
|
180
|
-
var bewit =
|
180
|
+
var bewit = credentials1.id + '\\' + exp + '\\' + mac + '\\' + ext;
|
181
181
|
|
182
182
|
req.url += '&bewit=' + Hoek.base64urlEncode(bewit);
|
183
183
|
|
184
|
-
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err,
|
184
|
+
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
|
185
185
|
|
186
186
|
expect(err).to.exist();
|
187
187
|
expect(err.output.payload.message).to.equal('Invalid method');
|
@@ -601,31 +601,20 @@ describe('Uri', function () {
|
|
601
601
|
done();
|
602
602
|
});
|
603
603
|
});
|
604
|
-
describe('authenticateMessage()', function () {
|
605
|
-
|
606
|
-
var credentialsFunc = function (id, callback) {
|
607
604
|
|
608
|
-
|
609
|
-
id: id,
|
610
|
-
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
611
|
-
algorithm: (id === '1' ? 'sha1' : 'sha256'),
|
612
|
-
user: 'steve'
|
613
|
-
};
|
614
|
-
|
615
|
-
return callback(null, credentials);
|
616
|
-
};
|
605
|
+
describe('authenticateMessage()', function () {
|
617
606
|
|
618
607
|
it('should generate an authorization then successfully parse it', function (done) {
|
619
608
|
|
620
|
-
credentialsFunc('123456', function (err,
|
609
|
+
credentialsFunc('123456', function (err, credentials1) {
|
621
610
|
|
622
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
611
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
623
612
|
expect(auth).to.exist();
|
624
613
|
|
625
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err,
|
614
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
|
626
615
|
|
627
616
|
expect(err).to.not.exist();
|
628
|
-
expect(
|
617
|
+
expect(credentials2.user).to.equal('steve');
|
629
618
|
done();
|
630
619
|
});
|
631
620
|
});
|
@@ -633,12 +622,12 @@ describe('Uri', function () {
|
|
633
622
|
|
634
623
|
it('should fail authorization on mismatching host', function (done) {
|
635
624
|
|
636
|
-
credentialsFunc('123456', function (err,
|
625
|
+
credentialsFunc('123456', function (err, credentials1) {
|
637
626
|
|
638
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
627
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
639
628
|
expect(auth).to.exist();
|
640
629
|
|
641
|
-
Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err,
|
630
|
+
Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
|
642
631
|
|
643
632
|
expect(err).to.exist();
|
644
633
|
expect(err.message).to.equal('Bad mac');
|
@@ -649,12 +638,12 @@ describe('Uri', function () {
|
|
649
638
|
|
650
639
|
it('should fail authorization on stale timestamp', function (done) {
|
651
640
|
|
652
|
-
credentialsFunc('123456', function (err,
|
641
|
+
credentialsFunc('123456', function (err, credentials1) {
|
653
642
|
|
654
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
643
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
655
644
|
expect(auth).to.exist();
|
656
645
|
|
657
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err,
|
646
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2) {
|
658
647
|
|
659
648
|
expect(err).to.exist();
|
660
649
|
expect(err.message).to.equal('Stale timestamp');
|
@@ -665,12 +654,12 @@ describe('Uri', function () {
|
|
665
654
|
|
666
655
|
it('overrides timestampSkewSec', function (done) {
|
667
656
|
|
668
|
-
credentialsFunc('123456', function (err,
|
657
|
+
credentialsFunc('123456', function (err, credentials1) {
|
669
658
|
|
670
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
659
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1, localtimeOffsetMsec: 100000 });
|
671
660
|
expect(auth).to.exist();
|
672
661
|
|
673
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err,
|
662
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err, credentials2) {
|
674
663
|
|
675
664
|
expect(err).to.not.exist();
|
676
665
|
done();
|
@@ -680,13 +669,13 @@ describe('Uri', function () {
|
|
680
669
|
|
681
670
|
it('should fail authorization on invalid authorization', function (done) {
|
682
671
|
|
683
|
-
credentialsFunc('123456', function (err,
|
672
|
+
credentialsFunc('123456', function (err, credentials1) {
|
684
673
|
|
685
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
674
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
686
675
|
expect(auth).to.exist();
|
687
676
|
delete auth.id;
|
688
677
|
|
689
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err,
|
678
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
|
690
679
|
|
691
680
|
expect(err).to.exist();
|
692
681
|
expect(err.message).to.equal('Invalid authorization');
|
@@ -697,12 +686,12 @@ describe('Uri', function () {
|
|
697
686
|
|
698
687
|
it('should fail authorization on bad hash', function (done) {
|
699
688
|
|
700
|
-
credentialsFunc('123456', function (err,
|
689
|
+
credentialsFunc('123456', function (err, credentials1) {
|
701
690
|
|
702
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
691
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
703
692
|
expect(auth).to.exist();
|
704
693
|
|
705
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err,
|
694
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials2) {
|
706
695
|
|
707
696
|
expect(err).to.exist();
|
708
697
|
expect(err.message).to.equal('Bad message hash');
|
@@ -713,9 +702,9 @@ describe('Uri', function () {
|
|
713
702
|
|
714
703
|
it('should fail authorization on nonce error', function (done) {
|
715
704
|
|
716
|
-
credentialsFunc('123456', function (err,
|
705
|
+
credentialsFunc('123456', function (err, credentials1) {
|
717
706
|
|
718
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
707
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
719
708
|
expect(auth).to.exist();
|
720
709
|
|
721
710
|
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
|
@@ -723,7 +712,7 @@ describe('Uri', function () {
|
|
723
712
|
|
724
713
|
callback(new Error('kaboom'));
|
725
714
|
}
|
726
|
-
}, function (err,
|
715
|
+
}, function (err, credentials2) {
|
727
716
|
|
728
717
|
expect(err).to.exist();
|
729
718
|
expect(err.message).to.equal('Invalid nonce');
|
@@ -734,9 +723,9 @@ describe('Uri', function () {
|
|
734
723
|
|
735
724
|
it('should fail authorization on credentials error', function (done) {
|
736
725
|
|
737
|
-
credentialsFunc('123456', function (err,
|
726
|
+
credentialsFunc('123456', function (err, credentials1) {
|
738
727
|
|
739
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
728
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
740
729
|
expect(auth).to.exist();
|
741
730
|
|
742
731
|
var errFunc = function (id, callback) {
|
@@ -744,7 +733,7 @@ describe('Uri', function () {
|
|
744
733
|
callback(new Error('kablooey'));
|
745
734
|
};
|
746
735
|
|
747
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err,
|
736
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
|
748
737
|
|
749
738
|
expect(err).to.exist();
|
750
739
|
expect(err.message).to.equal('kablooey');
|
@@ -755,9 +744,9 @@ describe('Uri', function () {
|
|
755
744
|
|
756
745
|
it('should fail authorization on missing credentials', function (done) {
|
757
746
|
|
758
|
-
credentialsFunc('123456', function (err,
|
747
|
+
credentialsFunc('123456', function (err, credentials1) {
|
759
748
|
|
760
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
749
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
761
750
|
expect(auth).to.exist();
|
762
751
|
|
763
752
|
var errFunc = function (id, callback) {
|
@@ -765,7 +754,7 @@ describe('Uri', function () {
|
|
765
754
|
callback();
|
766
755
|
};
|
767
756
|
|
768
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err,
|
757
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
|
769
758
|
|
770
759
|
expect(err).to.exist();
|
771
760
|
expect(err.message).to.equal('Unknown credentials');
|
@@ -776,9 +765,9 @@ describe('Uri', function () {
|
|
776
765
|
|
777
766
|
it('should fail authorization on invalid credentials', function (done) {
|
778
767
|
|
779
|
-
credentialsFunc('123456', function (err,
|
768
|
+
credentialsFunc('123456', function (err, credentials1) {
|
780
769
|
|
781
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
770
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
782
771
|
expect(auth).to.exist();
|
783
772
|
|
784
773
|
var errFunc = function (id, callback) {
|
@@ -786,7 +775,7 @@ describe('Uri', function () {
|
|
786
775
|
callback(null, {});
|
787
776
|
};
|
788
777
|
|
789
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err,
|
778
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
|
790
779
|
|
791
780
|
expect(err).to.exist();
|
792
781
|
expect(err.message).to.equal('Invalid credentials');
|
@@ -797,9 +786,9 @@ describe('Uri', function () {
|
|
797
786
|
|
798
787
|
it('should fail authorization on invalid credentials algorithm', function (done) {
|
799
788
|
|
800
|
-
credentialsFunc('123456', function (err,
|
789
|
+
credentialsFunc('123456', function (err, credentials1) {
|
801
790
|
|
802
|
-
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials:
|
791
|
+
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
803
792
|
expect(auth).to.exist();
|
804
793
|
|
805
794
|
var errFunc = function (id, callback) {
|
@@ -807,7 +796,7 @@ describe('Uri', function () {
|
|
807
796
|
callback(null, { key: '123', algorithm: '456' });
|
808
797
|
};
|
809
798
|
|
810
|
-
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err,
|
799
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
|
811
800
|
|
812
801
|
expect(err).to.exist();
|
813
802
|
expect(err.message).to.equal('Unknown algorithm');
|
@@ -818,9 +807,9 @@ describe('Uri', function () {
|
|
818
807
|
|
819
808
|
it('should fail on missing host', function (done) {
|
820
809
|
|
821
|
-
credentialsFunc('123456', function (err,
|
810
|
+
credentialsFunc('123456', function (err, credentials1) {
|
822
811
|
|
823
|
-
var auth = Hawk.client.message(null, 8080, 'some message', { credentials:
|
812
|
+
var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials1 });
|
824
813
|
expect(auth).to.not.exist();
|
825
814
|
done();
|
826
815
|
});
|
@@ -835,9 +824,9 @@ describe('Uri', function () {
|
|
835
824
|
|
836
825
|
it('should fail on invalid algorithm', function (done) {
|
837
826
|
|
838
|
-
credentialsFunc('123456', function (err,
|
827
|
+
credentialsFunc('123456', function (err, credentials1) {
|
839
828
|
|
840
|
-
var creds = Hoek.clone(
|
829
|
+
var creds = Hoek.clone(credentials1);
|
841
830
|
creds.algorithm = 'blah';
|
842
831
|
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds });
|
843
832
|
expect(auth).to.not.exist();
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# node-http-signature changelog
|
2
|
+
|
3
|
+
## 1.1.0
|
4
|
+
|
5
|
+
- Bump version of `sshpk` dependency, remove peerDependency on it since
|
6
|
+
it now supports exchanging objects between multiple versions of itself
|
7
|
+
where possible
|
8
|
+
|
9
|
+
## 1.0.2
|
10
|
+
|
11
|
+
- Bump min version of `jsprim` dependency, to include fixes for using
|
12
|
+
http-signature with `browserify`
|
13
|
+
|
14
|
+
## 1.0.1
|
15
|
+
|
16
|
+
- Bump minimum version of `sshpk` dependency, to include fixes for
|
17
|
+
whitespace tolerance in key parsing.
|
18
|
+
|
19
|
+
## 1.0.0
|
20
|
+
|
21
|
+
- First semver release.
|
22
|
+
- #36: Ensure verifySignature does not leak useful timing information
|
23
|
+
- #42: Bring the library up to the latest version of the spec (including the
|
24
|
+
request-target changes)
|
25
|
+
- Support for ECDSA keys and signatures.
|
26
|
+
- Now uses `sshpk` for key parsing, validation and conversion.
|
27
|
+
- Fixes for #21, #47, #39 and compatibility with node 0.8
|
28
|
+
|
29
|
+
## 0.11.0
|
30
|
+
|
31
|
+
- Split up HMAC and Signature verification to avoid vulnerabilities where a
|
32
|
+
key intended for use with one can be validated against the other method
|
33
|
+
instead.
|
34
|
+
|
35
|
+
## 0.10.2
|
36
|
+
|
37
|
+
- Updated versions of most dependencies.
|
38
|
+
- Utility functions exported for PEM => SSH-RSA conversion.
|
39
|
+
- Improvements to tests and examples.
|
@@ -120,10 +120,10 @@ All requests refer to the following request (body omitted):
|
|
120
120
|
|
121
121
|
POST /foo HTTP/1.1
|
122
122
|
Host: example.org
|
123
|
-
Date: Tue, 07 Jun
|
123
|
+
Date: Tue, 07 Jun 2014 20:51:35 GMT
|
124
124
|
Content-Type: application/json
|
125
|
-
|
126
|
-
Content-Length:
|
125
|
+
Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
|
126
|
+
Content-Length: 18
|
127
127
|
|
128
128
|
The "rsa-key-1" keyId refers to a private key known to the client and a public
|
129
129
|
key known to the server. The "hmac-key-1" keyId refers to key known to the
|
@@ -137,21 +137,21 @@ The authorization header and signature would be generated as:
|
|
137
137
|
|
138
138
|
The client would compose the signing string as:
|
139
139
|
|
140
|
-
date: Tue, 07 Jun
|
140
|
+
date: Tue, 07 Jun 2014 20:51:35 GMT
|
141
141
|
|
142
142
|
## Header List
|
143
143
|
|
144
144
|
The authorization header and signature would be generated as:
|
145
145
|
|
146
|
-
Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="request-
|
146
|
+
Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="(request-target) date content-type digest",signature="Base64(RSA-SHA256(signing string))"
|
147
147
|
|
148
148
|
The client would compose the signing string as (`+ "\n"` inserted for
|
149
149
|
readability):
|
150
150
|
|
151
|
-
|
151
|
+
(request-target) post /foo + "\n"
|
152
152
|
date: Tue, 07 Jun 2011 20:51:35 GMT + "\n"
|
153
153
|
content-type: application/json + "\n"
|
154
|
-
|
154
|
+
digest: SHA-256=Base64(SHA256(Body))
|
155
155
|
|
156
156
|
## Algorithm
|
157
157
|
|
@@ -261,9 +261,9 @@ And all examples use this request:
|
|
261
261
|
|
262
262
|
POST /foo?param=value&pet=dog HTTP/1.1
|
263
263
|
Host: example.com
|
264
|
-
Date: Thu, 05 Jan
|
264
|
+
Date: Thu, 05 Jan 2014 21:31:40 GMT
|
265
265
|
Content-Type: application/json
|
266
|
-
|
266
|
+
Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
|
267
267
|
Content-Length: 18
|
268
268
|
|
269
269
|
{"hello": "world"}
|
@@ -272,7 +272,7 @@ And all examples use this request:
|
|
272
272
|
|
273
273
|
The string to sign would be:
|
274
274
|
|
275
|
-
date: Thu, 05 Jan
|
275
|
+
date: Thu, 05 Jan 2014 21:31:40 GMT
|
276
276
|
|
277
277
|
The Authorization header would be:
|
278
278
|
|
@@ -283,14 +283,13 @@ The Authorization header would be:
|
|
283
283
|
Parameterized to include all headers, the string to sign would be (`+ "\n"`
|
284
284
|
inserted for readability):
|
285
285
|
|
286
|
-
|
287
|
-
host: example.com
|
288
|
-
date: Thu, 05 Jan
|
289
|
-
content-type: application/json
|
290
|
-
|
286
|
+
(request-target): post /foo?param=value&pet=dog
|
287
|
+
host: example.com
|
288
|
+
date: Thu, 05 Jan 2014 21:31:40 GMT
|
289
|
+
content-type: application/json
|
290
|
+
digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
|
291
291
|
content-length: 18
|
292
292
|
|
293
293
|
The Authorization header would be:
|
294
294
|
|
295
|
-
Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-
|
296
|
-
|
295
|
+
Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="(request-target) host date content-type digest content-length",signature="jgSqYK0yKclIHfF9zdApVEbDp5eqj8C4i4X76pE+XHoxugXv7qnVrGR+30bmBgtpR39I4utq17s9ghz/2QFVxlnToYAvbSVZJ9ulLd1HQBugO0jOyn9sXOtcN7uNHBjqNCqUsnt0sw/cJA6B6nJZpyNqNyAXKdxZZItOuhIs78w="
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var parser = require('./parser');
|
4
4
|
var signer = require('./signer');
|
5
5
|
var verify = require('./verify');
|
6
|
-
var
|
6
|
+
var utils = require('./utils');
|
7
7
|
|
8
8
|
|
9
9
|
|
@@ -16,10 +16,12 @@ module.exports = {
|
|
16
16
|
|
17
17
|
sign: signer.signRequest,
|
18
18
|
signRequest: signer.signRequest,
|
19
|
+
createSigner: signer.createSigner,
|
20
|
+
isSigner: signer.isSigner,
|
19
21
|
|
20
|
-
sshKeyToPEM:
|
21
|
-
sshKeyFingerprint:
|
22
|
-
pemToRsaSSHKey:
|
22
|
+
sshKeyToPEM: utils.sshKeyToPEM,
|
23
|
+
sshKeyFingerprint: utils.fingerprint,
|
24
|
+
pemToRsaSSHKey: utils.pemToRsaSSHKey,
|
23
25
|
|
24
26
|
verify: verify.verifySignature,
|
25
27
|
verifySignature: verify.verifySignature,
|
@@ -2,20 +2,17 @@
|
|
2
2
|
|
3
3
|
var assert = require('assert-plus');
|
4
4
|
var util = require('util');
|
5
|
+
var utils = require('./utils');
|
5
6
|
|
6
7
|
|
7
8
|
|
8
9
|
///--- Globals
|
9
10
|
|
10
|
-
var
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
'hmac-sha1': true,
|
16
|
-
'hmac-sha256': true,
|
17
|
-
'hmac-sha512': true
|
18
|
-
};
|
11
|
+
var HASH_ALGOS = utils.HASH_ALGOS;
|
12
|
+
var PK_ALGOS = utils.PK_ALGOS;
|
13
|
+
var HttpSignatureError = utils.HttpSignatureError;
|
14
|
+
var InvalidAlgorithmError = utils.InvalidAlgorithmError;
|
15
|
+
var validateAlgorithm = utils.validateAlgorithm;
|
19
16
|
|
20
17
|
var State = {
|
21
18
|
New: 0,
|
@@ -30,17 +27,8 @@ var ParamsState = {
|
|
30
27
|
};
|
31
28
|
|
32
29
|
|
33
|
-
|
34
30
|
///--- Specific Errors
|
35
31
|
|
36
|
-
function HttpSignatureError(message, caller) {
|
37
|
-
if (Error.captureStackTrace)
|
38
|
-
Error.captureStackTrace(this, caller || HttpSignatureError);
|
39
|
-
|
40
|
-
this.message = message;
|
41
|
-
this.name = caller.name;
|
42
|
-
}
|
43
|
-
util.inherits(HttpSignatureError, Error);
|
44
32
|
|
45
33
|
function ExpiredRequestError(message) {
|
46
34
|
HttpSignatureError.call(this, message, ExpiredRequestError);
|
@@ -65,7 +53,10 @@ function MissingHeaderError(message) {
|
|
65
53
|
}
|
66
54
|
util.inherits(MissingHeaderError, HttpSignatureError);
|
67
55
|
|
68
|
-
|
56
|
+
function StrictParsingError(message) {
|
57
|
+
HttpSignatureError.call(this, message, StrictParsingError);
|
58
|
+
}
|
59
|
+
util.inherits(StrictParsingError, HttpSignatureError);
|
69
60
|
|
70
61
|
///--- Exported API
|
71
62
|
|
@@ -88,7 +79,7 @@ module.exports = {
|
|
88
79
|
* "algorithm": "rsa-sha256",
|
89
80
|
* "headers": [
|
90
81
|
* "date" or "x-date",
|
91
|
-
* "
|
82
|
+
* "digest"
|
92
83
|
* ],
|
93
84
|
* "signature": "base64"
|
94
85
|
* },
|
@@ -100,6 +91,8 @@ module.exports = {
|
|
100
91
|
* - clockSkew: allowed clock skew in seconds (default 300).
|
101
92
|
* - headers: required header names (def: date or x-date)
|
102
93
|
* - algorithms: algorithms to support (default: all).
|
94
|
+
* - strict: should enforce latest spec parsing
|
95
|
+
* (default: false).
|
103
96
|
* @return {Object} parsed out object (see above).
|
104
97
|
* @throws {TypeError} on invalid input.
|
105
98
|
* @throws {InvalidHeaderError} on an invalid Authorization header error.
|
@@ -108,6 +101,8 @@ module.exports = {
|
|
108
101
|
* either in the request headers from the params,
|
109
102
|
* or not in the params from a required header
|
110
103
|
* in options.
|
104
|
+
* @throws {StrictParsingError} if old attributes are used in strict parsing
|
105
|
+
* mode.
|
111
106
|
* @throws {ExpiredRequestError} if the value of date or x-date exceeds skew.
|
112
107
|
*/
|
113
108
|
parseRequest: function parseRequest(request, options) {
|
@@ -148,7 +143,6 @@ module.exports = {
|
|
148
143
|
get keyId() {
|
149
144
|
return this.params.keyId;
|
150
145
|
}
|
151
|
-
|
152
146
|
};
|
153
147
|
|
154
148
|
var authz = request.headers.authorization;
|
@@ -243,23 +237,43 @@ module.exports = {
|
|
243
237
|
|
244
238
|
// Check the algorithm against the official list
|
245
239
|
parsed.params.algorithm = parsed.params.algorithm.toLowerCase();
|
246
|
-
|
247
|
-
|
248
|
-
|
240
|
+
try {
|
241
|
+
validateAlgorithm(parsed.params.algorithm);
|
242
|
+
} catch (e) {
|
243
|
+
if (e instanceof InvalidAlgorithmError)
|
244
|
+
throw (new InvalidParamsError(parsed.params.algorithm + ' is not ' +
|
245
|
+
'supported'));
|
246
|
+
else
|
247
|
+
throw (e);
|
248
|
+
}
|
249
249
|
|
250
250
|
// Build the signingString
|
251
251
|
for (i = 0; i < parsed.params.headers.length; i++) {
|
252
252
|
var h = parsed.params.headers[i].toLowerCase();
|
253
253
|
parsed.params.headers[i] = h;
|
254
254
|
|
255
|
-
if (h
|
255
|
+
if (h === 'request-line') {
|
256
|
+
if (!options.strict) {
|
257
|
+
/*
|
258
|
+
* We allow headers from the older spec drafts if strict parsing isn't
|
259
|
+
* specified in options.
|
260
|
+
*/
|
261
|
+
parsed.signingString +=
|
262
|
+
request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;
|
263
|
+
} else {
|
264
|
+
/* Strict parsing doesn't allow older draft headers. */
|
265
|
+
throw (new StrictParsingError('request-line is not a valid header ' +
|
266
|
+
'with strict parsing enabled.'));
|
267
|
+
}
|
268
|
+
} else if (h === '(request-target)') {
|
269
|
+
parsed.signingString +=
|
270
|
+
'(request-target): ' + request.method.toLowerCase() + ' ' +
|
271
|
+
request.url;
|
272
|
+
} else {
|
256
273
|
var value = request.headers[h];
|
257
|
-
if (
|
274
|
+
if (value === undefined)
|
258
275
|
throw new MissingHeaderError(h + ' was not in the request');
|
259
276
|
parsed.signingString += h + ': ' + value;
|
260
|
-
} else {
|
261
|
-
parsed.signingString +=
|
262
|
-
request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;
|
263
277
|
}
|
264
278
|
|
265
279
|
if ((i + 1) < parsed.params.headers.length)
|