Saturday, 28 September 2013

Testing routes with digest authentication

Testing routes with digest authentication

I'm trying to write some tests against an API which is protected by a
digest strategy.
request.post(url + '/route', {
auth: {
'user': 'anakin@empire.gx',
'pass': 'l1ghts4ber',
'sendImmediately': false
},
json: true,
body: { some: 'thing' }
}, function (error, response, body) {
console.log(error, body);
});
I tried supertest and request but both fail the authentication. The API
uses the passport-http digest method. Any ideas?

No comments:

Post a Comment