|
|
@ -24,7 +24,10 @@ import org.osgi.framework.BundleActivator;
|
|
|
|
import org.osgi.framework.BundleContext;
|
|
|
|
import org.osgi.framework.BundleContext;
|
|
|
|
import org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve;
|
|
|
|
import org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve;
|
|
|
|
import org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer;
|
|
|
|
import org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer;
|
|
|
|
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticator;
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticatorFrameworkValve;
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticatorFrameworkValve;
|
|
|
|
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticatorRepository;
|
|
|
|
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.config.AuthenticatorConfig;
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.config.WebappAuthenticatorConfig;
|
|
|
|
import org.wso2.carbon.webapp.authenticator.framework.config.WebappAuthenticatorConfig;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
@ -41,6 +44,14 @@ public class WebappAuthenticatorFrameworkBundleActivator implements BundleActiva
|
|
|
|
}
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
WebappAuthenticatorConfig.init();
|
|
|
|
WebappAuthenticatorConfig.init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WebappAuthenticatorRepository repository = new WebappAuthenticatorRepository();
|
|
|
|
|
|
|
|
for (AuthenticatorConfig config : WebappAuthenticatorConfig.getInstance().getAuthenticators()) {
|
|
|
|
|
|
|
|
WebappAuthenticator authenticator =
|
|
|
|
|
|
|
|
(WebappAuthenticator) Class.forName(config.getClassName()).newInstance();
|
|
|
|
|
|
|
|
repository.addAuthenticator(authenticator);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<CarbonTomcatValve> valves = new ArrayList<CarbonTomcatValve>();
|
|
|
|
List<CarbonTomcatValve> valves = new ArrayList<CarbonTomcatValve>();
|
|
|
|
valves.add(new WebappAuthenticatorFrameworkValve());
|
|
|
|
valves.add(new WebappAuthenticatorFrameworkValve());
|
|
|
|
TomcatValveContainer.addValves(valves);
|
|
|
|
TomcatValveContainer.addValves(valves);
|
|
|
|