0
我使用这种方法查找LDAP服务器。该列表包含大约30个LDAP服务器。在我的Tomcat应用程序中,我需要授权用户。我无法找到任何有关Shiro如何操作的文档。我知道如何指向一个LDAP
。但是我怎样才能指向多个LDAP
服务器?这些LDAP
服务器中的任何一个都可能在任何时候关闭。他们大多数虽然通常起来。另外我如何定期刷新LDAP
列表?我对LDAP没有任何控制权。所以我需要指出Shiro以下方法返回什么如何将Apache Shiro指向多个动态生成的LDAP服务器?
public List<String> getLdapServers (final String dnsServQuery)
{
final List<String> serverList = new ArrayList<>();
try {
final DirContext dnsContext = new InitialDirContext(env);
final String dnsQueryType[] = { "SRV" };
. . . blah blah
return serverList;
}