使用Angular2进行NTLM身份验证 [英] NTLM authentication using Angular2

查看:172
本文介绍了使用Angular2进行NTLM身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的客户端Web应用程序中,我需要使用ntlm协议对服务器进行身份验证。在使用Angular1时,使用$ http服务获取请求,浏览器(chrome,edge)通过提示用户输入用户名/密码来执行NTLM身份验证的所有3个步骤。

In my client web application, I need to authenticate with the server using ntlm protocol. While using Angular1, with the $http service get request, the browsers (chrome, edge) were doing all the 3 steps of the NTLM authentication by prompting user for username/password.

然而,使用Angular2,使用Angular2附带的http服务,浏览器(chrome,edge)只返回401而不执行后续步骤(它们甚至不提示用户提供凭据)。

However, with Angular2, using the http service that comes with Angular2, the browser (chrome,edge) just return 401 and do not do the subsequent steps (they do not even prompt the user for credentials).

在使用Angular2时,如何让浏览器为我做ntlm身份验证?
请不要建议使用ntlm javascript库。
我是StackOverflow的新手。如果我没有提供足够的信息或重复这个问题,抱歉。

How do I make browser do the ntlm authentication for me while using Angular2 ? Please do not suggest the ntlm javascript library. I'm new to StackOverflow. If I haven't given sufficient info or repeated the question, sorry about that.

先谢谢。

推荐答案

我不相信问题出在NTLM或您的编码工作中。根据非常有信誉的SO社区成员Anton Bessonov的说法,Angular2中的一些模块还没有生产就绪,而Angular1是一个非常稳定的代码版本,我建议在可预见的未来坚持使用Angular1。参考:新项目的角度1对角度2

I don't believe the problem is with NTLM or in your coding efforts. According to Anton Bessonov, a very reputable SO community member, some modules in Angular2 are just not production-ready yet, while Angular1 is a very stable code release, and my advise is to stick with Angular1 that for the foreseeable future. Ref: angular 1 vs angular 2 for new project

这篇关于使用Angular2进行NTLM身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆