从IE抓取用户名,以针对LDAP进行身份验证 [英] Grab username from IE, to authenticate against LDAP

查看:107
本文介绍了从IE抓取用户名,以针对LDAP进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户将仅使用IE,并且在IE中,如果他们登录到域控制器,则可以在不提示的情况下传递其凭据.

The users will only use IE, and within IE it can pass their credentials without being prompted to, if they are logged onto the domain controller.

我想知道的是,我该如何获取他们的用户名?

What I want to know is, how do I go about grabbing their username?

我以为这可以解决问题:$_SERVER['auth_user'];但没有运气.

I thought this would do the trick: $_SERVER['auth_user'];but no luck.

就像这样可以获取Windows(AD) PHP中的用户名?

但是我不知道代码应该是什么样子来捕获/获取用户名

But I don't know what the code should look like this to capture/grab the user's username

感谢您的帮助.

推荐答案

无法直接解决php中的问题,但是您可以借助javascript获取用户名:

There is no way to solve the problem in php directly, but you can obtain the username with the help of javascript:

<script type="text/javascript">
<!--
var WinNetwork = new ActiveXObject("WScript.Network");
alert(WinNetwork.UserName);
//-->
</script> 

只需添加一些AJAX;)

Just add some AJAX ;)

HTH

这篇关于从IE抓取用户名,以针对LDAP进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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