use of com.haulmont.cuba.web.auth.CubaAuthProvider in project cuba by cuba-platform.
the class CubaHttpFilter method init.
@Override
public void init(FilterConfig filterConfig) throws ServletException {
try {
Configuration configuration = AppBeans.get(Configuration.NAME);
// Fill bypassUrls
WebConfig webConfig = configuration.getConfig(WebConfig.class);
bypassUrls.addAll(webConfig.getCubaHttpFilterBypassUrls());
List<Filter> filters = new ArrayList<>();
if (configuration.getConfig(WebAuthConfig.class).getExternalAuthentication()) {
try {
CubaAuthProvider authProvider = AppBeans.get(CubaAuthProvider.NAME);
filters.add(authProvider);
} catch (Exception e) {
throw new ServletException(e);
}
}
filters.addAll(getHttpRequestFilterBeans());
setFilters(filters);
super.init(filterConfig);
log.debug("CubaHttpFilter initialized");
} catch (RuntimeException e) {
log.error("Error initializing CubaHttpFilter", e);
throw e;
}
}
Aggregations