与IIS PHP Windows身份验证 [英] Windows authentication with PHP on IIS

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

问题描述

我工作的一个Intranet应用是构建在PHP在IIS。我想从浏览器到IIS使用Windows身份验证自动通过用户名来验证广告。反正有做到这一点?

I'm Working on an Intranet application that is build in PHP on IIS. I want to authenticate against an AD by passing the username automatically from the browser to the IIS using windows authentication. Is there anyway to do that?

推荐答案

是的,IIS支持集成的Windows身份验证。进入身份验证选项为您的网站......

Yes, IIS supports integrated Windows authentication. Access the 'Authentication' option for your website...

......,改变Windows身份验证项为Enabled(也许是匿名身份验证为已禁用,如果要强制用户进行身份验证)...

...and change the 'Windows Authentication' item to 'enabled' (and perhaps 'Anonymous Authentication' to 'disabled' if you want to force users to authenticate)...

详细信息可在的Technet

在PHP中的用户名应该填充在 $ _ SERVER 超全局。我觉得作为 AUTH_USER ,但我无法证实,现在。使用的var_dump($ _ SERVER); 找到正确的键

In PHP the username should be populated in the $_SERVER superglobal. I think as AUTH_USER, but I can't confirm that right now. Use var_dump($_SERVER); to find the correct key.

这篇关于与IIS PHP Windows身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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