throw new RuntimeException("Error loading authenticator class " + className, e);
}
try {
AbstractAuthenticator authenticatorInstance = (AbstractAuthenticator) authenticatorClass.newInstance();
authenticatorInstance.setAuthenticatorName(name);
if (enabled != null) {
authenticatorInstance.setEnabled(Boolean.parseBoolean(enabled));
}
if (priority != null) {
authenticatorInstance.setPriority(Integer.parseInt(priority));
}
UserStore userStore = createUserStore(userStoreClassName);
authenticatorInstance.setUserStore(userStore);
return authenticatorInstance;
} catch (InstantiationException e) {
String error = "Error instantiating authenticator class " + className + " object.";