https://github.com/ramhiser/aws-hmac
Node.js utility to generate an AWS HMAC signature
https://github.com/ramhiser/aws-hmac
aws-hmac hmac-signature javascript nodejs
Last synced: over 1 year ago
JSON representation
Node.js utility to generate an AWS HMAC signature
- Host: GitHub
- URL: https://github.com/ramhiser/aws-hmac
- Owner: ramhiser
- License: mit
- Created: 2016-04-02T03:12:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-03T22:30:10.000Z (over 10 years ago)
- Last Synced: 2025-03-22T12:16:35.955Z (over 1 year ago)
- Topics: aws-hmac, hmac-signature, javascript, nodejs
- Language: JavaScript
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-hmac
A small Node.js utility to generate an HMAC signature to authorize AWS API
requests.
For more details about signing AWS requests, see the
[AWS docs](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/query-interface-authentication.html).
Special thanks to Robert Kehoe for providing
[a clear example](https://www.robertkehoe.com/2013/10/generating-aws-hmac-in-nodejs/)
from which this utility is derived.
## Installation
```
npm install aws-hmac --save
```
## Usage
```javascript
aws_access_id = "ramhiser"
aws_secret_key = "FLUFFY BUNNIES"
var aws_hmac = require("aws-hmac");
aws_signature = aws_hmac.generate_signature(aws_access_id, aws_secret_key);
console.log(aws_signature);
/*
{ Date: 'Sat, 02 Apr 2016 03:33:17 GMT',
'X-Amzn-Authorization': 'AWS3-HTTPS
AWSAccessKeyId=ramhiser,Algorithm=HMACSHA256,Signature=OIPTkauadMhOOTWJsoKcFMv7jAldNOz45pCDwYegmKI=' }
*/
```
## Tests
```
npm test
```
## License
The `aws-hmac` module is licensed under the
[MIT License](http://opensource.org/licenses/MIT) and is freely available for
commercial and non-commerical usage. Please consult the licensing terms in the
`LICENSE` file for more details.