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.
- How ntlm works for webservice?
- How can I customize login page while using ntlm? currently I am getting input box for login credentials.
- Which users can I use to authenticate? currently the application accepting anything as username and password. So I am not clear that which username and password it will use.
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);
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