apipost-cli 1.0.8 → 1.0.13
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.
- package/README.md +4 -0
- package/dist/37.index.js +452 -0
- package/dist/841.index.js +6984 -0
- package/dist/action.js +4 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/AbortController.d.ts +85 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/AbortSignal.d.ts +80 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/index.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts +229 -0
- package/dist/apipost-cli/node_modules/@azure/core-client/types/3.1/core-client.d.ts +900 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/core-paging.d.ts +77 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/samples-dev/getPagedAsyncIteratorSample.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/getPagedAsyncIterator.d.ts +10 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/index.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/models.d.ts +69 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/test/getPagedAsyncIterator.spec.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@azure/core-rest-pipeline/types/3.1/core-rest-pipeline.d.ts +1114 -0
- package/dist/apipost-cli/node_modules/@azure/core-util/types/3.1/core-util.d.ts +112 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/buffer.d.ts +2351 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/cluster.d.ts +410 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/crypto.d.ts +3961 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/fs.d.ts +4043 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/net.d.ts +886 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/process.d.ts +1485 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/tty.d.ts +205 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/dist/apipost-cli/node_modules/bignumber.js/LICENCE.md +26 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.js +2926 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.mjs +2889 -0
- package/dist/apipost-cli/node_modules/bignumber.js/doc/API.html +2249 -0
- package/dist/apipost-cli/node_modules/bignumber.js/package.json +50 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpufeatures/src/binding.o +0 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/cbc.js +65 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/cipher.js +142 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/des.js +150 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/ede.js +54 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/utils.js +256 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des.js +7 -0
- package/dist/apipost-cli/node_modules/des.js/package.json +33 -0
- package/dist/apipost-cli/node_modules/des.js/test/cbc-test.js +73 -0
- package/dist/apipost-cli/node_modules/des.js/test/des-test.js +139 -0
- package/dist/apipost-cli/node_modules/des.js/test/ede-test.js +106 -0
- package/dist/apipost-cli/node_modules/des.js/test/fixtures.js +5 -0
- package/dist/apipost-cli/node_modules/des.js/test/utils-test.js +169 -0
- package/dist/apipost-cli/node_modules/fs.realpath/LICENSE +43 -0
- package/dist/apipost-cli/node_modules/fs.realpath/index.js +66 -0
- package/dist/apipost-cli/node_modules/fs.realpath/old.js +303 -0
- package/dist/apipost-cli/node_modules/fs.realpath/package.json +26 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/auto.js +3 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/helpers/functionsHaveNames.js +5 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/implementation.js +43 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/index.js +18 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/package.json +80 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/polyfill.js +7 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/shim.js +35 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/index.js +23 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/shimmed.js +21 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/tests.js +60 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/uglified.js +17 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/index.js +599 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/package.json +17 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/index.js +676 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/package.json +17 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/index.js +896 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/package.json +17 -0
- package/dist/apipost-cli/node_modules/moment/ts3.1-typings/moment.d.ts +785 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/LICENSE +20 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/Makefile +36 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/oauth-1.0a.d.ts +192 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/oauth-1.0a.js +377 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/package.json +30 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/getParameterString.js +21 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/mocha.opts +4 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/oauth_body_hash.js +141 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/consumer.js +14 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/last_ampersand.js +55 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/multiple_values.js +54 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/multiple_values_qs.js +50 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/nonce_length.js +44 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/parameter_seperator.js +102 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/realm.js +51 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/signature_method.js +36 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/bitbucket.js +88 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/flickr.js +196 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/openbank.js +61 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/twitter.js +183 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/twitter_sample_data.js +94 -0
- package/dist/apipost-cli/node_modules/object.assign/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/object.assign/auto.js +3 -0
- package/dist/apipost-cli/node_modules/object.assign/dist/browser.js +944 -0
- package/dist/apipost-cli/node_modules/object.assign/hasSymbols.js +43 -0
- package/dist/apipost-cli/node_modules/object.assign/implementation.js +46 -0
- package/dist/apipost-cli/node_modules/object.assign/index.js +22 -0
- package/dist/apipost-cli/node_modules/object.assign/package.json +96 -0
- package/dist/apipost-cli/node_modules/object.assign/polyfill.js +55 -0
- package/dist/apipost-cli/node_modules/object.assign/shim.js +14 -0
- package/dist/apipost-cli/node_modules/object.assign/test/implementation.js +19 -0
- package/dist/apipost-cli/node_modules/object.assign/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/object.assign/test/native.js +49 -0
- package/dist/apipost-cli/node_modules/object.assign/test/ses-compat.js +12 -0
- package/dist/apipost-cli/node_modules/object.assign/test/shimmed.js +52 -0
- package/dist/apipost-cli/node_modules/object.assign/test/tests.js +232 -0
- package/dist/apipost-cli/node_modules/object.assign/test.html +18458 -0
- package/dist/apipost-cli/node_modules/promise.series/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/promise.series/index.js +10 -0
- package/dist/apipost-cli/node_modules/promise.series/package.json +34 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/LICENSE +22 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/auto.js +3 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/implementation.js +42 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/index.js +18 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/package.json +100 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/polyfill.js +36 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/shim.js +26 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/shimmed.js +48 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/tests.js +143 -0
- package/dist/apipost-cli/node_modules/resolve.exports/dist/index.js +1 -0
- package/dist/apipost-cli/node_modules/resolve.exports/dist/index.mjs +1 -0
- package/dist/apipost-cli/node_modules/resolve.exports/index.d.ts +100 -0
- package/dist/apipost-cli/node_modules/resolve.exports/license +21 -0
- package/dist/apipost-cli/node_modules/resolve.exports/package.json +50 -0
- package/dist/apipost-cli/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/implementation.js +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/package.json +101 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/polyfill.js +19 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/implementation.js +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/tests.js +45 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/implementation.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/package.json +79 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/polyfill.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/tests.js +31 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/implementation.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/package.json +79 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/polyfill.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/index.js +18 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/tests.js +31 -0
- package/dist/apipost-cli/node_modules/web-streams-polyfill/dist/types/ts3.6/polyfill.d.ts +771 -0
- package/dist/apipost-http-schema.json +129 -0
- package/dist/bridge.js +1010 -0
- package/dist/build/Release/cpufeatures.node +0 -0
- package/dist/esprima.js +3756 -0
- package/dist/events.js +977 -0
- package/dist/index.js +565958 -0
- package/dist/index1.js +26 -0
- package/dist/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/dist/module.js +34 -0
- package/dist/pagent.exe +0 -0
- package/dist/setup-node-sandbox.js +461 -0
- package/dist/setup-sandbox.js +545 -0
- package/dist/snappy.darwin-arm64.node +0 -0
- package/dist/xdg-open +1066 -0
- package/package.json +13 -4
- package/bin/cli.js +0 -216
- package/bin/template.js +0 -803
- /package/{bin → dist/apipost-cli}/apipost-reports//346/265/213/350/257/225.html" +0 -0
- /package/{bin → dist/apipost-cli}/apipost-reports//346/265/213/350/257/225.json" +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
describe("OAuth Body Hash", function() {
|
|
6
|
+
var oauth, request;
|
|
7
|
+
|
|
8
|
+
beforeEach(function() {
|
|
9
|
+
var algo = 'sha1';
|
|
10
|
+
var enc = 'base64';
|
|
11
|
+
|
|
12
|
+
oauth = new OAuth({
|
|
13
|
+
consumer: {
|
|
14
|
+
key: '1434affd-4d69-4a1a-bace-cc5c6fe493bc',
|
|
15
|
+
secret: '932a216f-fb94-43b6-a2d2-e9c6b345cbea'
|
|
16
|
+
},
|
|
17
|
+
signature_method: 'HMAC-SHA1',
|
|
18
|
+
hash_function: function (base_string, key) {
|
|
19
|
+
return crypto.createHmac(algo, key).update(base_string).digest(enc);
|
|
20
|
+
},
|
|
21
|
+
body_hash_function: function (data) {
|
|
22
|
+
return crypto.createHash(algo).update(data).digest(enc);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
//overide for testing only !!!
|
|
27
|
+
oauth.getTimeStamp = function () {
|
|
28
|
+
return 1484599369;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//overide for testing only !!!
|
|
32
|
+
oauth.getNonce = function (length) {
|
|
33
|
+
return 't62lMDp9DLwKZJJbZTpmSAhRINGBEOcF';
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
request = {
|
|
37
|
+
url: 'http://canvas.docker/api/lti/accounts/1/tool_proxy',
|
|
38
|
+
method: 'POST',
|
|
39
|
+
data: {
|
|
40
|
+
"@context": [
|
|
41
|
+
"http://purl.imsglobal.org/ctx/lti/v2/ToolProxy"
|
|
42
|
+
],
|
|
43
|
+
"@type": "ToolProxy",
|
|
44
|
+
"lti_version": "LTI-2p1",
|
|
45
|
+
"tool_proxy_guid": "0cf04d67-8a0d-4d41-af61-6e8c6fc3e68c",
|
|
46
|
+
"tool_consumer_profile": "http://canvas.docker/api/lti/accounts/1/tool_consumer_profile/339b6700-e4cb-47c5-a54f-3ee0064921a9",
|
|
47
|
+
"tool_profile": {
|
|
48
|
+
"lti_version": "LTI-2p1",
|
|
49
|
+
"product_instance": {
|
|
50
|
+
"guid": "fd75124a-140e-470f-944c-114d2d93db40",
|
|
51
|
+
"product_info": {
|
|
52
|
+
"product_name": {
|
|
53
|
+
"default_value": "TestTool",
|
|
54
|
+
"key": "tool.name"
|
|
55
|
+
},
|
|
56
|
+
"product_version": "0.1.0",
|
|
57
|
+
"product_family": {
|
|
58
|
+
"code": "testtool",
|
|
59
|
+
"vendor": {
|
|
60
|
+
"code": "Example.com",
|
|
61
|
+
"vendor_name": {
|
|
62
|
+
"default_value": "Example",
|
|
63
|
+
"key": "tool.vendor.name"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"base_url_choice": [
|
|
70
|
+
{
|
|
71
|
+
"default_base_url": "http://example.docker/",
|
|
72
|
+
"selector": {
|
|
73
|
+
"applies_to": [
|
|
74
|
+
"MessageHandler"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"resource_handler": [
|
|
80
|
+
{
|
|
81
|
+
"resource_type": {
|
|
82
|
+
"code": "testtool"
|
|
83
|
+
},
|
|
84
|
+
"resource_name": {
|
|
85
|
+
"default_value": "TestTool",
|
|
86
|
+
"key": "testtool.resource.name"
|
|
87
|
+
},
|
|
88
|
+
"message": [
|
|
89
|
+
{
|
|
90
|
+
"message_type": "basic-lti-launch-request",
|
|
91
|
+
"path": "lti_launch",
|
|
92
|
+
"enabled_capability": [
|
|
93
|
+
"Canvas.placements.courseNavigation"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"enabled_capability": [
|
|
101
|
+
"OAuth.splitSecret"
|
|
102
|
+
],
|
|
103
|
+
"security_contract": {
|
|
104
|
+
"tp_half_shared_secret": "1c7849d3c9f037a9891575c8508d3aaab6a9e1312b5d0353625f83d68f0d545344f81ff9e1849b6400982a0d3f6bf953c6095265e3b6d700a73f5be94ce5654c"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
includeBodyHash: true
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
describe('#getBodyHash', function() {
|
|
112
|
+
it('should handle data encoded as an object', function() {
|
|
113
|
+
expect(oauth.getBodyHash(request, '')).to.equal('xpJzRG6xylVIRRtiigLPKX7iRmM=')
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it('should handle data encoded as a string', function() {
|
|
117
|
+
request.data = 'Hello World!';
|
|
118
|
+
expect(oauth.getBodyHash(request, '')).to.equal('Lve95gjOVATpfV8EL5X4nxwjKHE=')
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
describe('#authorize', function() {
|
|
123
|
+
it('should properly include an oauth_body_hash param', function() {
|
|
124
|
+
expect(oauth.authorize(request)).to.eql({
|
|
125
|
+
oauth_consumer_key: '1434affd-4d69-4a1a-bace-cc5c6fe493bc',
|
|
126
|
+
oauth_nonce: 't62lMDp9DLwKZJJbZTpmSAhRINGBEOcF',
|
|
127
|
+
oauth_signature_method: 'HMAC-SHA1',
|
|
128
|
+
oauth_timestamp: 1484599369,
|
|
129
|
+
oauth_version: '1.0',
|
|
130
|
+
oauth_body_hash: 'xpJzRG6xylVIRRtiigLPKX7iRmM=',
|
|
131
|
+
oauth_signature: '1Q0U8yhK1bWYguRxlUDs9KHywOE='
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
describe('#toHeader', function() {
|
|
137
|
+
it('should properly include an oauth_body_hash header', function() {
|
|
138
|
+
expect(oauth.toHeader(oauth.authorize(request))).to.have.property('Authorization', 'OAuth oauth_body_hash="xpJzRG6xylVIRRtiigLPKX7iRmM%3D", oauth_consumer_key="1434affd-4d69-4a1a-bace-cc5c6fe493bc", oauth_nonce="t62lMDp9DLwKZJJbZTpmSAhRINGBEOcF", oauth_signature="1Q0U8yhK1bWYguRxlUDs9KHywOE%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1484599369", oauth_version="1.0"');
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
|
|
4
|
+
//TODO: check alphabet and numberic only
|
|
5
|
+
|
|
6
|
+
describe("consumer option", function() {
|
|
7
|
+
describe("required option", function() {
|
|
8
|
+
it("should throw error on undefined", function() {
|
|
9
|
+
expect(function() {
|
|
10
|
+
oauth = OAuth();
|
|
11
|
+
}).to.throw('consumer option is required');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
function hash_function_SHA1(base_string, key) {
|
|
6
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
describe("last_ampersand option", function() {
|
|
10
|
+
|
|
11
|
+
describe("default (true)", function() {
|
|
12
|
+
var oauth = OAuth({
|
|
13
|
+
consumer: {
|
|
14
|
+
secret: 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw'
|
|
15
|
+
},
|
|
16
|
+
signature_method: 'HMAC-SHA1',
|
|
17
|
+
hash_function: hash_function_SHA1
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var token = {
|
|
21
|
+
secret: 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE'
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
it("should be equal to Twitter example", function() {
|
|
25
|
+
expect(oauth.getSigningKey(token.secret)).to.equal('kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw&LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("should has the ampersand at the end", function() {
|
|
29
|
+
expect(oauth.getSigningKey()).to.equal('kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw&');
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
describe("change to false", function() {
|
|
34
|
+
var oauth = OAuth({
|
|
35
|
+
consumer: {
|
|
36
|
+
secret: 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw'
|
|
37
|
+
},
|
|
38
|
+
signature_method: 'HMAC-SHA1',
|
|
39
|
+
hash_function: hash_function_SHA1,
|
|
40
|
+
last_ampersand: false
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var token = {
|
|
44
|
+
secret: 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE'
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
it("should be equal to Twitter example", function() {
|
|
48
|
+
expect(oauth.getSigningKey(token.secret)).to.equal('kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw&LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE');
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("should not has the ampersand at the end", function() {
|
|
52
|
+
expect(oauth.getSigningKey()).to.equal('kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw');
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
function hash_function_SHA1(base_string, key) {
|
|
6
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
describe("Signature method", function() {
|
|
10
|
+
describe("HMAC-SHA1 signature method with multiple values", function() {
|
|
11
|
+
var oauth = new OAuth({
|
|
12
|
+
consumer: {
|
|
13
|
+
key: "batch-dbc2cd8c-6ca8-463b-96e2-6d8683eac6fd",
|
|
14
|
+
secret: "4S4Rvm25CJZWv7HBg5HOhhlRTBSZ7npl"
|
|
15
|
+
},
|
|
16
|
+
signature_method: 'HMAC-SHA1',
|
|
17
|
+
hash_function: hash_function_SHA1
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//overide for testing only !!!
|
|
21
|
+
oauth.getTimeStamp = function() {
|
|
22
|
+
return 1445951836;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//overide for testing only !!!
|
|
26
|
+
oauth.getNonce = function(length) {
|
|
27
|
+
return 'tKOQtKan8PHIrIoOlrl17zHkZQ2H5CsP';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var request_data = {
|
|
32
|
+
url: "http://localhost:3737/rest/profiles/1ea2a42f-e14d-4057-8bcd-3e0b4514a267/properties?alt=json",
|
|
33
|
+
method: "PUT",
|
|
34
|
+
data: {
|
|
35
|
+
currentbrowserversion: [ '1', '5', 'dfadfadfa' ],
|
|
36
|
+
alt: 'json'
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var result = oauth.authorize(request_data);
|
|
41
|
+
|
|
42
|
+
it("Signature should match", function() {
|
|
43
|
+
expect(result.oauth_signature).to.equal("ri0lfv4udd2uQmkg5cCPVqLruyk=");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("Nonce should match", function() {
|
|
47
|
+
expect(result.oauth_nonce).to.equal("tKOQtKan8PHIrIoOlrl17zHkZQ2H5CsP");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("Timestamp should match", function() {
|
|
51
|
+
expect(result.oauth_timestamp).to.equal(1445951836);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
function hash_function_SHA1(base_string, key) {
|
|
6
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
describe("Signature method", function() {
|
|
10
|
+
describe("HMAC-SHA1 signature method with multiple duplicate values in the querystring", function() {
|
|
11
|
+
var oauth = new OAuth({
|
|
12
|
+
consumer: {
|
|
13
|
+
key: "batch-8f4fd2c6-9fa3-4368-9797-52876d723dd1",
|
|
14
|
+
secret: "ZACXtYe6LQ4C5X0KbJcDkbW77GYtlaoU"
|
|
15
|
+
},
|
|
16
|
+
signature_method: 'HMAC-SHA1',
|
|
17
|
+
hash_function: hash_function_SHA1
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//overide for testing only !!!
|
|
21
|
+
oauth.getTimeStamp = function() {
|
|
22
|
+
return 1504882975;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//overide for testing only !!!
|
|
26
|
+
oauth.getNonce = function(length) {
|
|
27
|
+
return 'xsEYfvjTEiPTR3TqJbmhCpUdrDoHF6nk';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var request_data = {
|
|
32
|
+
url: "http://localhost:3737/rest/profiles?property=email&value=vel.arcu%40ultriciesornareelit.ca&property=visitdate&value=abc&alt=json",
|
|
33
|
+
method: "GET"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var result = oauth.authorize(request_data);
|
|
37
|
+
|
|
38
|
+
it("Signature should match", function() {
|
|
39
|
+
expect(result.oauth_signature).to.equal("b6nMehqpHnpx0VlZB9IhqFh4Jq0=");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("Nonce should match", function() {
|
|
43
|
+
expect(result.oauth_nonce).to.equal("xsEYfvjTEiPTR3TqJbmhCpUdrDoHF6nk");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("Timestamp should match", function() {
|
|
47
|
+
expect(result.oauth_timestamp).to.equal(1504882975);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
|
|
4
|
+
//TODO: check alphabet and numberic only
|
|
5
|
+
|
|
6
|
+
describe("nonce_length option", function() {
|
|
7
|
+
describe("default (32)", function() {
|
|
8
|
+
var oauth = OAuth({
|
|
9
|
+
consumer: {}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("nonce length should be 32", function() {
|
|
13
|
+
expect(oauth.getNonce().length).to.equal(32);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe("length 100", function() {
|
|
18
|
+
var oauth = OAuth({
|
|
19
|
+
consumer: {},
|
|
20
|
+
nonce_length: 100
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("nonce length should be 100", function() {
|
|
24
|
+
expect(oauth.getNonce().length).to.equal(100);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe("random length", function() {
|
|
29
|
+
var random = parseInt(Math.random()*100, 10);
|
|
30
|
+
|
|
31
|
+
while(random === 0) {
|
|
32
|
+
random = parseInt(Math.random()*100, 10);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var oauth = new OAuth({
|
|
36
|
+
consumer: {},
|
|
37
|
+
nonce_length: random
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("nonce length should be correct", function() {
|
|
41
|
+
expect(oauth.getNonce().length).to.equal(random);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
function hash_function_SHA1(base_string, key) {
|
|
6
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
describe("parameter_seperator option", function() {
|
|
10
|
+
describe("default (', ')", function() {
|
|
11
|
+
var oauth = OAuth({
|
|
12
|
+
consumer: {
|
|
13
|
+
key: 'xvz1evFS4wEEPTGEFPHBog',
|
|
14
|
+
secret: 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw'
|
|
15
|
+
},
|
|
16
|
+
signature_method: 'HMAC-SHA1',
|
|
17
|
+
hash_function: hash_function_SHA1
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//overide for testing only !!!
|
|
21
|
+
oauth.getTimeStamp = function() {
|
|
22
|
+
return 1318622958;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//overide for testing only !!!
|
|
26
|
+
oauth.getNonce = function(length) {
|
|
27
|
+
return 'kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var token = {
|
|
31
|
+
key: '370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb',
|
|
32
|
+
secret: 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE'
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var request = {
|
|
36
|
+
url: 'https://api.twitter.com/1/statuses/update.json?include_entities=true',
|
|
37
|
+
method: 'POST',
|
|
38
|
+
data: {
|
|
39
|
+
status: 'Hello Ladies + Gentlemen, a signed OAuth request!'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
it("should be equal to Twitter example", function() {
|
|
44
|
+
expect(oauth.toHeader(oauth.authorize(request, token))).to.have.property('Authorization', 'OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318622958", oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb", oauth_version="1.0"');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
describe("-", function() {
|
|
49
|
+
var oauth = OAuth({
|
|
50
|
+
consumer: {
|
|
51
|
+
key: 'xvz1evFS4wEEPTGEFPHBog',
|
|
52
|
+
secret: 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw'
|
|
53
|
+
},
|
|
54
|
+
signature_method: 'HMAC-SHA1',
|
|
55
|
+
hash_function: hash_function_SHA1,
|
|
56
|
+
parameter_seperator: '-'
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
//overide for testing only !!!
|
|
60
|
+
oauth.getTimeStamp = function() {
|
|
61
|
+
return 1318622958;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//overide for testing only !!!
|
|
65
|
+
oauth.getNonce = function(length) {
|
|
66
|
+
return 'kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg';
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
var token = {
|
|
70
|
+
key: '370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb',
|
|
71
|
+
secret: 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE'
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var request = {
|
|
75
|
+
url: 'https://api.twitter.com/1/statuses/update.json?include_entities=true',
|
|
76
|
+
method: 'POST',
|
|
77
|
+
data: {
|
|
78
|
+
status: 'Hello Ladies + Gentlemen, a signed OAuth request!'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
it("header should be correct", function() {
|
|
83
|
+
expect(oauth.toHeader(oauth.authorize(request, token))).to.have.property('Authorization', 'OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog"-oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg"-oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D"-oauth_signature_method="HMAC-SHA1"-oauth_timestamp="1318622958"-oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb"-oauth_version="1.0"');
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
function generateTest(options) {
|
|
89
|
+
var oauth = new OAuth(options);
|
|
90
|
+
|
|
91
|
+
//overide for testing only !!!
|
|
92
|
+
oauth.getTimeStamp = function() {
|
|
93
|
+
return 1318622958;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
//overide for testing only !!!
|
|
97
|
+
oauth.getNonce = function(length) {
|
|
98
|
+
return 'kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg';
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return oauth;
|
|
102
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
function hash_function_SHA1(base_string, key) {
|
|
6
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
describe("Realm", function() {
|
|
10
|
+
describe("HMAC-SHA1 signature method with multiple values", function() {
|
|
11
|
+
var oauth = new OAuth({
|
|
12
|
+
consumer: {
|
|
13
|
+
key: "batch-dbc2cd8c-6ca8-463b-96e2-6d8683eac6fd",
|
|
14
|
+
secret: "4S4Rvm25CJZWv7HBg5HOhhlRTBSZ7npl"
|
|
15
|
+
},
|
|
16
|
+
// realm: "hi@ddo.me",
|
|
17
|
+
realm: "https://ddo.me/",
|
|
18
|
+
signature_method: 'HMAC-SHA1',
|
|
19
|
+
hash_function: hash_function_SHA1
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
//overide for testing only !!!
|
|
23
|
+
oauth.getTimeStamp = function() {
|
|
24
|
+
return 1445951836;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//overide for testing only !!!
|
|
28
|
+
oauth.getNonce = function(length) {
|
|
29
|
+
return 'tKOQtKan8PHIrIoOlrl17zHkZQ2H5CsP';
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
var request_data = {
|
|
34
|
+
url: "http://localhost:3737/rest/profiles/1ea2a42f-e14d-4057-8bcd-3e0b4514a267/properties?alt=json",
|
|
35
|
+
method: "PUT",
|
|
36
|
+
data: {
|
|
37
|
+
currentbrowserversion: [ '1', '5', 'dfadfadfa' ],
|
|
38
|
+
alt: 'json'
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var result = oauth.authorize(request_data);
|
|
43
|
+
var result_header = oauth.toHeader(result);
|
|
44
|
+
|
|
45
|
+
it("Header with realm should match", function() {
|
|
46
|
+
expect(result_header).to.eql({
|
|
47
|
+
Authorization: 'OAuth realm="https://ddo.me/", oauth_consumer_key="batch-dbc2cd8c-6ca8-463b-96e2-6d8683eac6fd", oauth_nonce="tKOQtKan8PHIrIoOlrl17zHkZQ2H5CsP", oauth_signature="ri0lfv4udd2uQmkg5cCPVqLruyk%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1445951836", oauth_version="1.0"'
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../../oauth-1.0a');
|
|
3
|
+
|
|
4
|
+
describe("Signature method", function() {
|
|
5
|
+
describe("default PLAINTEXT signature method", function() {
|
|
6
|
+
var oauth = new OAuth({
|
|
7
|
+
consumer: {}
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it("hash should be return key only", function() {
|
|
11
|
+
expect(oauth.signature_method).to.equal('PLAINTEXT');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("default PLAINTEXT hash function", function() {
|
|
16
|
+
var oauth = new OAuth({
|
|
17
|
+
consumer: {},
|
|
18
|
+
signature_method: 'PLAINTEXT'
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("hash should be return key only", function() {
|
|
22
|
+
expect(oauth.hash_function('base_string', 'key')).to.equal('key');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
describe("missing hash function", function() {
|
|
27
|
+
it("constructor should throw a error", function() {
|
|
28
|
+
expect(function() {
|
|
29
|
+
OAuth({
|
|
30
|
+
consumer: {},
|
|
31
|
+
signature_method: 'RSA-SHA1',
|
|
32
|
+
});
|
|
33
|
+
}).to.throw('hash_function option is required');
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var Request = require('request');
|
|
3
|
+
var OAuth = require('../../oauth-1.0a');
|
|
4
|
+
var crypto = require('crypto');
|
|
5
|
+
|
|
6
|
+
describe("Bitbucket Personal Consumer", function() {
|
|
7
|
+
var oauth
|
|
8
|
+
|
|
9
|
+
beforeEach(function () {
|
|
10
|
+
if (
|
|
11
|
+
!process.env.BITBUCKET_CONSUMER_PUBLIC ||
|
|
12
|
+
!process.env.BITBUCKET_CONSUMER_SECRET
|
|
13
|
+
) {
|
|
14
|
+
this.skip('Bitbucket secret not set.');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
this.timeout(10000);
|
|
19
|
+
|
|
20
|
+
oauth = new OAuth({
|
|
21
|
+
consumer: {
|
|
22
|
+
key: process.env.BITBUCKET_CONSUMER_PUBLIC,
|
|
23
|
+
secret: process.env.BITBUCKET_CONSUMER_SECRET
|
|
24
|
+
},
|
|
25
|
+
signature_method: 'HMAC-SHA1',
|
|
26
|
+
hash_function: function(base_string, key) {
|
|
27
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe("#Request Token", function() {
|
|
33
|
+
var request = {
|
|
34
|
+
url: 'https://bitbucket.org/api/1.0/oauth/request_token',
|
|
35
|
+
method: 'POST',
|
|
36
|
+
data: {
|
|
37
|
+
oauth_callback: 'http://www.ddo.me'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
it("should be a valid response", function(done) {
|
|
42
|
+
Request({
|
|
43
|
+
url: request.url,
|
|
44
|
+
method: request.method,
|
|
45
|
+
form: oauth.authorize(request)
|
|
46
|
+
}, function(err, res, body) {
|
|
47
|
+
expect(body).to.be.a('string');
|
|
48
|
+
|
|
49
|
+
body = oauth.deParam(body);
|
|
50
|
+
|
|
51
|
+
expect(body).to.have.property('oauth_callback_confirmed', 'true');
|
|
52
|
+
expect(body).to.have.property('oauth_token');
|
|
53
|
+
expect(body).to.have.property('oauth_token_secret');
|
|
54
|
+
|
|
55
|
+
done();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
describe("#Request Token by Header", function() {
|
|
61
|
+
var request = {
|
|
62
|
+
url: 'https://bitbucket.org/api/1.0/oauth/request_token',
|
|
63
|
+
method: 'POST',
|
|
64
|
+
data: {
|
|
65
|
+
oauth_callback: 'http://www.ddo.me'
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
it("should be a valid response", function(done) {
|
|
70
|
+
Request({
|
|
71
|
+
url: request.url,
|
|
72
|
+
method: request.method,
|
|
73
|
+
form: request.data,
|
|
74
|
+
headers: oauth.toHeader(oauth.authorize(request))
|
|
75
|
+
}, function(err, res, body) {
|
|
76
|
+
expect(body).to.be.a('string');
|
|
77
|
+
|
|
78
|
+
body = oauth.deParam(body);
|
|
79
|
+
|
|
80
|
+
expect(body).to.have.property('oauth_callback_confirmed', 'true');
|
|
81
|
+
expect(body).to.have.property('oauth_token');
|
|
82
|
+
expect(body).to.have.property('oauth_token_secret');
|
|
83
|
+
|
|
84
|
+
done();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|