superagent-hawk
Extends superagent or supertest with hawk:
var superagent = ;var addHawk = ;var request = ; request ;
Installation
Install with component:
$ component install CrowdProcess/superagent-hawk
And with npm:
$ npm install superagent-hawk
API
The normal superagent things,
plus hawk
:
var superagent = ;var addHawk = ;var request = ; var credential = "id": "50e17602-f044-41cb-8e5f-ae634cc15fb0" "key": "I2Yiq3UGAUR6Oztnv/3JJK6T0clmGTX14d/TJ1qNKio=" "algorithm": "sha256"; var options = // look at https://github.com/hueniverse/hawk/blob/master/lib/browser.js#L26 localtimeOffsetMsec: 500; request // options is, well, optional ;
and bewit
:
var superagent = ;var addHawk = ;var request = ; var bewit = "ZDA1Mzg4Y2UtMGRmYi00NWFlLThlODMtY2Q2MmJlZGE0MDNlXDEzNzM0Njc3NDNcNnJyUjA3QWdOQkVWVHlENCsxOFZTZ2M1OERqWmxrc3VzVHZoOUpLM0JzQT1c"; request ;
Verify server response signatures (optional)
var options = localtimeOffsetMsec: 500 verifyResponse: true; var credential = "id": "50e17602-f044-41cb-8e5f-ae634cc15fb0" "key": "I2Yiq3UGAUR6Oztnv/3JJK6T0clmGTX14d/TJ1qNKio=" "algorithm": "sha256"; request // options is, well, optional ;
License
MIT