Package org.springframework.web.filter

Examples of org.springframework.web.filter.DelegatingFilterProxy


    registerProxyFilter(servletContext, "springSecurityFilterChain");
    registerProxyFilter(servletContext, "oauth2ClientContextFilter");
  }

  private void registerProxyFilter(ServletContext servletContext, String name) {
    DelegatingFilterProxy filter = new DelegatingFilterProxy(name);
    filter.setContextAttribute("org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher");
    servletContext.addFilter(name, filter).addMappingForUrlPatterns(null, false, "/*");
  }
 
View Full Code Here


    private synchronized Filter getDelegateFilter(String nodeId, WebApplicationContext context) {
        Filter filter = this._nodeIdToFilterMap.get(nodeId);

        if (filter == null) {
            filter = new DelegatingFilterProxy(getFilterName(), context);
            this._nodeIdToFilterMap.put(nodeId, filter);
        }

        return filter;
    }
View Full Code Here

      /* Configure default servlet for agent server */
      rootServlet = agentroot.addServlet(DefaultServlet.class, "/");
      rootServlet.setInitOrder(1);

      //Spring Security Filter initialization
      DelegatingFilterProxy springSecurityFilter = new DelegatingFilterProxy();
      springSecurityFilter.setTargetBeanName("springSecurityFilterChain");

      //session-per-request strategy for api and agents
      root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/api/*", 1);
      root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/proxy/*", 1);
      agentroot.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/agent/*", 1);
View Full Code Here

      /* Configure default servlet for agent server */
      rootServlet = agentroot.addServlet(DefaultServlet.class, "/");
      rootServlet.setInitOrder(1);

      //Spring Security Filter initialization
      DelegatingFilterProxy springSecurityFilter = new DelegatingFilterProxy();
      springSecurityFilter.setTargetBeanName("springSecurityFilterChain");

      //session-per-request strategy for api and agents
      root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/api/*", 1);
      agentroot.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/agent/*", 1);

View Full Code Here

        Map<String, String> initParams = new HashMap<String,String>();
        initParams.put("contextConfigLocation", "file://" + springConfig);
        initParams.put("contextClass", NimbusXmlWebApplicationContext.class.getCanonicalName());
        context.setInitParams(initParams);
        context.addEventListener(new ContextLoaderListener());
        FilterHolder filterHolder = new FilterHolder(new DelegatingFilterProxy());
        filterHolder.setName("springSecurityFilterChain");
        context.addFilter(filterHolder, "/*", Handler.DEFAULT);
        final CXFServlet cxfServlet = new CXFServlet();
        ServletHolder servletHolder = new ServletHolder(cxfServlet);
        servletHolder.setInitOrder(1);
View Full Code Here

        Map<String, String> initParams = new HashMap<String,String>();
        initParams.put("contextConfigLocation", springConfig);
        initParams.put("contextClass", NimbusXmlWebApplicationContext.class.getCanonicalName());
        context.setInitParams(initParams);
        context.addEventListener(new ContextLoaderListener());
        FilterHolder filterHolder = new FilterHolder(new DelegatingFilterProxy());
        filterHolder.setName("filterChainProxy");
        context.addFilter(filterHolder, "/*", Handler.DEFAULT);
        ServletHolder servletHolder = new ServletHolder(new CXFServlet());
        servletHolder.setInitOrder(1);
        servletHolder.setName("CXFServlet");
View Full Code Here

        "/j_spring_security_check");
  }

  private void registerSpringSecurityFilterChain(ServletContext servletContext) {
    FilterRegistration.Dynamic springSecurityFilterChain = servletContext.addFilter(
        BeanIds.SPRING_SECURITY_FILTER_CHAIN, new DelegatingFilterProxy());
    springSecurityFilterChain.addMappingForUrlPatterns(null, false, "/*");
  }
 
View Full Code Here

      ServletHolder rootServlet = root.addServlet(DefaultServlet.class, "/");
      rootServlet.setInitOrder(1);

      //Spring Security Filter initialization
      DelegatingFilterProxy springSecurityFilter = new DelegatingFilterProxy();
      springSecurityFilter.setTargetBeanName("springSecurityFilterChain");

      //session-per-request strategy for api
      root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/api/*", 1);

      if (configuration.getApiAuthentication()) {
View Full Code Here

    protected Filter[] getServletFilters() {
        CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter();
        characterEncodingFilter.setEncoding("UTF-8");
        characterEncodingFilter.setForceEncoding(true);

        DelegatingFilterProxy securityFilterChain = new DelegatingFilterProxy("springSecurityFilterChain");

        return new Filter[] {characterEncodingFilter, securityFilterChain};
    }
View Full Code Here

    @Override
    protected Filter[] getServletFilters() {
      return new Filter[] {
          new HiddenHttpMethodFilter(),
          new DelegatingFilterProxy("a"),
          new DelegatingFilterProxy("b"),
          new DelegatingFilterProxy("c")
      };
    }
View Full Code Here

TOP

Related Classes of org.springframework.web.filter.DelegatingFilterProxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.