_casFilters.get(companyId);
if (casFilter == null) {
casFilter = new edu.yale.its.tp.cas.client.filter.CASFilter();
DynamicFilterConfig config = new DynamicFilterConfig(
_filterName, _servletContext);
String serverName = PrefsPropsUtil.getString(
companyId, PropsKeys.CAS_SERVER_NAME,
PropsValues.CAS_SERVER_NAME);
String serviceUrl = PrefsPropsUtil.getString(
companyId, PropsKeys.CAS_SERVICE_URL,
PropsValues.CAS_SERVICE_URL);
config.addInitParameter(
edu.yale.its.tp.cas.client.filter.CASFilter.LOGIN_INIT_PARAM,
PrefsPropsUtil.getString(
companyId, PropsKeys.CAS_LOGIN_URL,
PropsValues.CAS_LOGIN_URL));
if (Validator.isNotNull(serviceUrl)) {
config.addInitParameter(
edu.yale.its.tp.cas.client.filter.CASFilter.
SERVICE_INIT_PARAM,
serviceUrl);
}
else {
config.addInitParameter(
edu.yale.its.tp.cas.client.filter.CASFilter.
SERVERNAME_INIT_PARAM,
serverName);
}
config.addInitParameter(
edu.yale.its.tp.cas.client.filter.CASFilter.VALIDATE_INIT_PARAM,
PrefsPropsUtil.getString(
companyId, PropsKeys.CAS_VALIDATE_URL,
PropsValues.CAS_VALIDATE_URL));
//Add proxy call back url
config.addInitParameter(edu.yale.its.tp.cas.client.filter.CASFilter.PROXY_CALLBACK_INIT_PARAM,
PrefsPropsUtil.getString(
companyId, "cas.proxycallback.url"));
casFilter.init(config);