问题描述
我必须将我的客户从一个网站转移到另一个网站。这发生在客户端。在这第二个网站上,它使用windows基本认证系统。所以它会弹出登录窗口。我需要省略这个弹出窗口并使用javascript在第二个网站上验证我的客户端,然后将他重定向到第二个网站。即使我将凭据放在javascript文件中也没有安全问题,因为整个系统在Intranet中运行。那么如何在第二个网站上验证客户端?
I have to transfer my client from one website to another website. This happens in client side. In this 2nd website, its using windows basic authentication system. So It popups the login window. I need to omit this Popup window and authenticate my client on 2nd website using javascript and then redirect him to 2nd website. There is no security issue even I put credentials in javascript file since this whole system is running in Intranet. So How to authenticate client on 2nd website ?
我发现这个帖子
但它不起作用。当我查看第二个URL的请求标头时,它不包含授权标签。
But it does not work. When I look the request header of 2nd url, It does not contain the Authorization tag.
推荐答案
如果它是基本身份验证而你不介意公开凭证,为什么不简单地在URL中插入用户名和密码?例如:
If it is basic authentication and you don't mind exposing the credential, why don't you simply insert username and password into the URL? For example:
但如果您可以控制Web服务器,你真的应该禁用内网连接的身份验证。
But if you have control over the Web server, you really should disable authentication for intranet connections.
这篇关于使用Javascript验证Windows身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!