Ang*_*key 8 exchange-server ntlm exchangewebservices node.js
我试图使用Node.js来调用SOAP Exchange EWS服务.我创建了一个简单的http客户端,如下所示:
var https = require('https');
var username = 'user';
var password = 'password';
var auth = 'NTLM ' + new Buffer(username + ":" + password).toString('base64');
var options = {
host : 'exchangehost',
port : 443,
method : 'post',
path : '/Exchange.asmx',
headers : { Authorization : auth }
};
var request = https.request(options, function(response) {
console.log('Status: ' + response.statusCode);
};
request.write('<soapenv:Envelope ...></soapenv:Envelope>');
request.end();
Run Code Online (Sandbox Code Playgroud)
我收到状态码401,我怀疑是因为我没有做NTLM认证涉及的三个步骤(http://www.innovation.ch/personal/ronald/ntlm.html).有没有人知道Node.js模块直接与Exchange EWS通信或使用NTLM进行身份验证,或者我是否需要自己为Node.js实现该协议?非常感谢任何帮助.
| 归档时间: |
|
| 查看次数: |
12079 次 |
| 最近记录: |