use of org.apache.zookeeper_voltpatches.server.auth.IPAuthenticationProvider in project voltdb by VoltDB.
the class ProviderRegistry method initialize.
public static void initialize() {
synchronized (ProviderRegistry.class) {
if (initialized)
return;
IPAuthenticationProvider ipp = new IPAuthenticationProvider();
DigestAuthenticationProvider digp = new DigestAuthenticationProvider();
authenticationProviders.put(ipp.getScheme(), ipp);
authenticationProviders.put(digp.getScheme(), digp);
Enumeration<Object> en = System.getProperties().keys();
while (en.hasMoreElements()) {
String k = (String) en.nextElement();
if (k.startsWith("zookeeper.authProvider.")) {
String className = System.getProperty(k);
try {
Class<?> c = ZooKeeperServer.class.getClassLoader().loadClass(className);
AuthenticationProvider ap = (AuthenticationProvider) c.newInstance();
authenticationProviders.put(ap.getScheme(), ap);
} catch (Exception e) {
LOG.warn("Problems loading " + className, e);
}
}
}
initialized = true;
}
}
Aggregations