}
if (filter==null)
throw createSecurityException(SecurityConfigException.UNKNOWN_FILTER_$2,requestChain.getName(),filterName);
if (filter instanceof GeoServerAuthenticationFilter == false)
throw createSecurityException(SecurityConfigException.NOT_AN_AUTHENTICATION_FILTER_$2,requestChain.getName(),filterName);
GeoServerAuthenticationFilter authFilter = (GeoServerAuthenticationFilter) filter;
if (requestChain instanceof HtmlLoginFilterChain && authFilter.applicableForHtml()==false) {
throw createSecurityException(SecurityConfigException.NOT_A_HTML_AUTHENTICATION_FILTER_$2,requestChain.getName(),filterName);
}
if (requestChain instanceof ServiceLoginFilterChain && authFilter.applicableForServices()==false) {
throw createSecurityException(SecurityConfigException.NOT_A_SERVICE_AUTHENTICATION_FILTER_$2,requestChain.getName(),filterName);
}
}
}