为了更好地理解ntlm,比如http://www.innovation.ch/personal/ronald/ntlm.html,我浏览了一些网站。我开始创建一个演示,它使用ntlm对nodejs应用程序中的用户进行身份验证。在这个演示中,我使用、高速公路、和快递-ntlm模块创建了应用程序。但我仍然不明白,ntlm是如何与nodejs with服务协同工作的?
我脑子里有一些关于ntlm认证的问题。
这是我的密码。
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);发布于 2014-11-25 04:31:35
有一个Passport.js身份验证策略,它支持NTLM身份验证,并具有允许自定义登录屏幕的方法。如何配置它将取决于您使用的服务器类型,但它们在解释示例中的概念方面做得很好。
请参阅非集成身份验证一节。
发布于 2014-11-26 08:55:01
我想你是在找this answer。阅读josh3736的答案,他解释了NTLM的流程。
同样,正如Brian所建议的那样,您真的不需要进入所有这些东西,passport.js可以有效地为您处理这一切。这里是一个教程http://passportjs.org/guide/
发布于 2022-05-10 14:10:47
用于GET请求的NTLM进程:
STEP 1: The Client requests a protected resource from the server
STEP 2: The Server responds with a 401 status, with a header indicating that the client must authenticate
STEP 3: The Client resubmits the request with an Authorization header containing a Base-64 encoded Type 1 message. From this point forward, the connection is kept open; closing the connection requires reauthentication of subsequent requests.
STEP 4: The Server replies with a 401 status containing a Base-64 encoded Type 2 message in the WWW-Authenticate header
STEP 5: The Client responds to the Type 2 message by resubmitting the request with an Authorization header containing a Base-64 encoded Type 3 message
STEP 6: Finally, the Server validates the responses in the client's Type 3 message and allows access to the resource.NTLM处理员额请求:
STEP 1: The Client submit an empty POST request with a Type 1 message in the "Authorization" header
STEP 2: The Server replies with a 401 status containing a Base-64 encoded Type 2 message in the WWW-Authenticate header
STEP 3: The Client resubmits the POST with a Base-64 encoded Type 3 message Type 3 message, sending the data payload with the request.https://stackoverflow.com/questions/26968261
复制相似问题