@Test public void crumbExclusionChecksRequestPath() throws Exception { System.setProperty("casc.reload.token", "someSecretValue"); TokenReloadCrumbExclusion crumbExclusion = new TokenReloadCrumbExclusion(); assertFalse(crumbExclusion.process(newRequestWithPath("/reload-configuration-as-code/2"), null, null)); }
@Override public boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { if (TokenReloadAction.tokenReloadEnabled()) { String pathInfo = request.getPathInfo(); if (pathInfo != null && pathInfo.equals("/" + TokenReloadAction.URL_NAME + "/")) { chain.doFilter(request, response); return true; } } return false; }
TokenReloadCrumbExclusion extends CrumbExclusion { @Override public boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { if (TokenReloadAction.tokenReloadEnabled()) { String pathInfo = request.getPathInfo(); if (pathInfo != null && pathInfo.equals("/" + TokenReloadAction.URL_NAME + "/")) { chain.doFilter(request, response); return true; } } return false; } }
TokenReloadCrumbExclusion extends CrumbExclusion { @Override public boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { if (TokenReloadAction.tokenReloadEnabled()) { String pathInfo = request.getPathInfo(); if (pathInfo != null && pathInfo.equals("/" + TokenReloadAction.URL_NAME + "/")) { chain.doFilter(request, response); return true; } } return false; }  }
TokenReloadCrumbExclusion extends CrumbExclusion { @Override public boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { if (TokenReloadAction.tokenReloadEnabled()) { String pathInfo = request.getPathInfo(); if (pathInfo != null && pathInfo.equals("/" + TokenReloadAction.URL_NAME + "/")) { chain.doFilter(request, response); return true; } } return false; }  @Override boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain); }
TokenReloadCrumbExclusion extends CrumbExclusion { @Override public boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { if (TokenReloadAction.tokenReloadEnabled()) { String pathInfo = request.getPathInfo(); if (pathInfo != null && pathInfo.equals("/" + TokenReloadAction.URL_NAME + "/")) { chain.doFilter(request, response); return true; } } return false; }  @Override boolean process(HttpServletRequest request, HttpServletResponse response, FilterChain chain);  }