Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. const ntlm = require('express-ntlm');
  2.  
  3. module.exports = app => {
  4.  
  5. app.use(
  6. ntlm({
  7. debug: function() {
  8. var args = Array.prototype.slice.apply(arguments);
  9. console.log.apply(null, args);
  10. },
  11. domain: 'MS',
  12. domaincontroller: 'ldap://something.com'
  13. })
  14. );
  15. app.post('/get-user-details/', (req, res) => {
  16. 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
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement