1

Can I authenticate my users by their IPs in a Active Directory system in Java language? I am connected to network by a linux machine. I don't know where I must start form.

Thanks in advance

4

2 回答 2

1

也许使用 SASL 或扩展。

LDAP 没有规定来确定客户端的 IP 地址。

SASL在 LDAP 协议之外

-吉姆

于 2012-09-28T09:52:43.583 回答
1

使用UnboundID LDAP SDK SimpleBindRequest或 SASL 绑定请求类之一来验证 LDAP 客户端连接。客户端将需要可分辨名称和简单 BIND 请求的凭据。LDAP 客户端应确定如何从 IP 地址创建专有名称。例如:

final String hostname = "the hostname";
final int port = PORT; // sometimes 389
try
{
    final LDAPConnection connection = new LDAPConnection(hostname,port);
    try
    {
        final SimpleBindRequest request = new SimpleBindRequest(bindDN,bindPassword);
        final BindResult result = connection.bind(request);
    }
    finally
    {
        connection.close();
    }
}
catch(final LDAPException ex)
{
     handle the exception ...;
}

也可以看看

于 2012-09-27T12:35:36.910 回答