public static RequestFilterChain lookupRequestChainByName( String name, GeoServerSecurityManager secMgr) { // this is kind of a hack but we create an initial filter chain and run it through the // security provider extension points to get an actual final chain, and then look through // the elements for a matching name GeoServerSecurityFilterChain filterChain = createInitialChain(); filterChain.postConfigure(secMgr); for (RequestFilterChain requestChain : filterChain.getRequestChains()) { if (requestChain.getName().equals(name)) { return requestChain; } } return null; }
public static RequestFilterChain lookupRequestChainByPattern( String pattern, GeoServerSecurityManager secMgr) { // this is kind of a hack but we create an initial filter chain and run it through the // security provider extension points to get an actual final chain, and then look through // the elements for a matching name GeoServerSecurityFilterChain filterChain = createInitialChain(); filterChain.postConfigure(secMgr); for (RequestFilterChain requestChain : filterChain.getRequestChains()) { if (requestChain.getPatterns().contains(pattern)) { return requestChain; } } return null; }
config.setRememberMeService(rememberMeConfig); config.setFilterChain(GeoServerSecurityFilterChain.createInitialChain()); saveSecurityConfig(config);