Module for authenticating with NTLM; An ntlm authentication wrapper for the Request module.
$ npm install --save-dev request-ntlm-continued
var ntlm = require('request-ntlm-continued');
var opts = {
username: 'username',
password: 'password',
ntlm_domain: 'yourdomain',
workstation: 'workstation',
url: 'http://example.com/path/to/resource'
};
var json = {
// whatever object you want to submit
};
ntlm.post(opts, json, function(err, response) {
// do something
});
Requests can also be streamed:
ntlm.get(opts, json, null, fs.createWriteStream('example.pdf'));
- don't assume the post body is an object and should be made into json
- options.domain is in use by request. Use ntlm_domain instead
- ability to set custom headers
- ability to use http and not only https
- gracefully complete the request if the server doesn't actually require NTLM.
Fail only if
options.ntlm.strict
is set totrue
(default=false
). - implement streaming