node.jsresthttpexpressntlm

How NTLM works for webservice to authenticate users?


I gone through some websites for better understanding of ntlm like http://www.innovation.ch/personal/ronald/ntlm.html. And I started to create a demo which authenticate users in nodejs application using ntlm. In this demo I created application with expressjs and express-ntlm modules. But still I didn't understood that, how ntlm works with nodejs webservices?

I am having some questions in my mind about ntlm authentication.

Here is my code.

var app, express, ntlm;

express = require('express');

ntlm = require('express-ntlm');

app = express();

app.all('/', ntlm());

app.get('/', function(request, response) {
  response.send(request.ntlm);
});

app.listen(3000);

Solution

  • There is a Passport.js authentication strategy that supports NTLM authentication and has a method for allowing a custom login screen. How to configure it will depend on which type of server you're using, but they do a good job of explaining the concepts within their examples.

    Look at the section Non-Integrated authentication

    https://www.npmjs.org/package/passport-windowsauth