开发者

Can php ldap authentication with active directory send client IP instead of server IP?

开发者 https://www.devze.com 2022-12-22 17:10 出处:网络
When authenticating to ldap using the following php code: $ldap = ldap_connect(\"ldap.example.com\") if($bind = ldap_bind($ldap, $_POST[\'username\'], $_POST[\'password\'])) {

When authenticating to ldap using the following php code:

$ldap = ldap_connect("ldap.example.com")
if($bind = ldap_bind($ldap, $_POST['username'], $_POST['password'])) {
  // log them in!
} else {
  // error message
}

Is there any way to sent the 开发者_JS百科client IP address to the AD server rather than the server IP?


No, because your server is what's actually making the connection to AD.

It's not a matter of "sending the IP address", the AD server is going to look at the actual connection and see what the remote address is (your PHP server, in this case).

0

精彩评论

暂无评论...
验证码 换一张
取 消