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
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
使用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 ...;
}