【发布时间】:2019-01-28 14:51:18
【问题描述】:
我正在使用express-ntlm 在 Intranet 设置中获取当前用户的 Windows ID。它大部分时间都可以正常工作,但偶尔它会返回一个完全不同的人的 ID。我猜这可能与会话有关?
const ntlm = require('express-ntlm');
module.exports = app => {
app.use(
ntlm({
debug: function() {
var args = Array.prototype.slice.apply(arguments);
console.log.apply(null, args);
},
domain: 'MS',
domaincontroller: 'ldap://something.com'
})
);
app.post('/get-user-details/', (req, res) => {
console.log(req.ntlm.UserName); //Returns correct user most of the time, but sometimes it returns different person who open site at the same time
});
【问题讨论】:
标签: node.js express-ntlm