PHP 内网可以共享 Windows 登录吗?

Can a PHP intranet share Windows logins?(PHP 内网可以共享 Windows 登录吗?)
本文介绍了PHP 内网可以共享 Windows 登录吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我创建了一些需要用户登录的基于 PHP 的 Intranet 资源.用户创建自己的登录名,我使用 cookie 验证他们是否已登录.

I have created some PHP-based intranet resources that require users to log in. The users create their own logins, and I verify that they are logged in using a cookie.

有人问我是否可以将该登录名与他们的 Windows 登录名联系起来.我最初的回答是网页无法访问您的 Windows 登录名 - 这将是一个安全风险."但是我们的一个部门使用了 Sharepoint,它实际上将自己与 Windows 登录绑定在一起.

I've been asked if I can tie that login to their Windows login instead. My initial response was "a web page cannot access your Windows login - that would be a security risk." But one of our departments uses Sharepoint, and it does in fact tie itself to the Windows login.

这是怎么做到的?我可以用 PHP 做吗?如果是这样,为什么它不是一个可怕的安全漏洞?

How is that done? Can I do it in PHP? If so, why is it not a horrible security hole?

推荐答案

您正在寻找的是针对 PHP 网站的 NTLM 身份验证,这是完全可行的,但在 PHP 中似乎没有单一方法可以做到这一点.

What you are looking for is NTLM authentication against the PHP website, which is perfectly doable but seems there is no single way in PHP to do it.

看看http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/

您还需要将站点添加到 IE 中的受信任站点(或您使用的任何浏览器中的等效站点),并在受信任站点的设置中,启用发送当前用户名和密码".

You also need to add the sites to your trusted sites in IE (or the equivalent in whichever browser you are using) and in the settings for trusted sites, turn on 'send current username and password'.

这不是一个可怕的安全漏洞,因为凭据不是通过网络直接发送的,并且最终用户已明确告诉浏览器将凭据发送到相关网站.

Its not a horrible security hole because the credentials are not sent en clair over the wire, and the end user has specifically told the browser to send credentials to the website in question.

这篇关于PHP 内网可以共享 Windows 登录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Subtract time in PHP(在 PHP 中减去时间)
Limit execution time of an function or command PHP(限制函数或命令 PHP 的执行时间)
How to sum N number of time (HH:MM Format)?(如何求和 N 次(HH:MM 格式)?)
How to get current time in milliseconds in PHP?(如何在 PHP 中以毫秒为单位获取当前时间?)
How to check if time is between two times in PHP(如何检查时间是否在 PHP 中的两次之间)
Convert number of minutes into hours amp; minutes using PHP(将分钟数转换为小时数分钟使用 PHP)