Skip to content

Commit

Permalink
Made aws4 external dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
simov committed Jan 27, 2016
1 parent cacade5 commit a5101c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -754,7 +754,7 @@ The first argument can be either a `url` or an `options` object. The only requir
- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2.
- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.
- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.

---
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -23,7 +23,6 @@
"main": "index.js",
"dependencies": {
"aws-sign2": "~0.6.0",
"aws4": "^1.2.1",
"bl": "~1.0.0",
"caseless": "~0.11.0",
"combined-stream": "~1.0.5",
Expand Down Expand Up @@ -52,6 +51,7 @@
"lint": "eslint lib/ *.js tests/ && echo Lint passed."
},
"devDependencies": {
"aws4": "^1.2.1",
"bluebird": "^3.0.2",
"browserify": "^13.0.0",
"browserify-istanbul": "^0.1.5",
Expand Down
2 changes: 1 addition & 1 deletion request.js
Expand Up @@ -9,7 +9,6 @@ var http = require('http')
, bl = require('bl')
, hawk = require('hawk')
, aws2 = require('aws-sign2')
, aws4 = require('aws4')
, httpSignature = require('http-signature')
, mime = require('mime-types')
, stringstream = require('stringstream')
Expand Down Expand Up @@ -1232,6 +1231,7 @@ Request.prototype.aws = function (opts, now) {
}

if (opts.sign_version == 4 || opts.sign_version == '4') {
var aws4 = require('aws4')
// use aws4
var options = {
host: self.uri.host,
Expand Down

0 comments on commit a5101c5

Please sign in to comment.