@Test public void testThatFilterShouldNotRunWhenRbacIsNotRequired() throws Exception { RequestContext ctx = RequestContext.getCurrentContext(); ctx.set("shouldDoRbac", false); assertFalse(rbacFilter.shouldFilter()); }
@Override public boolean shouldFilter() { RequestContext ctx = RequestContext.getCurrentContext(); return ctx.getBoolean(RBAC_BOOLEAN_FLAG_NAME); }
RbacFilter extends ZuulFilter { @Override public boolean shouldFilter() { RequestContext ctx = RequestContext.getCurrentContext(); return ctx.getBoolean(RBAC_BOOLEAN_FLAG_NAME); } }
RbacFilter extends ZuulFilter { @Override public boolean shouldFilter() { RequestContext ctx = RequestContext.getCurrentContext(); return ctx.getBoolean(RBAC_BOOLEAN_FLAG_NAME); } @Autowired  RbacFilter(RestTemplate restTemplate, String authorizationUrl, ObjectMapper objectMapper); }
RbacFilter extends ZuulFilter { @Override public boolean shouldFilter() { RequestContext ctx = RequestContext.getCurrentContext(); return ctx.getBoolean(RBAC_BOOLEAN_FLAG_NAME); } @Autowired  RbacFilter(RestTemplate restTemplate, String authorizationUrl, ObjectMapper objectMapper); @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run(); }
RbacFilter extends ZuulFilter { @Override public boolean shouldFilter() { RequestContext ctx = RequestContext.getCurrentContext(); return ctx.getBoolean(RBAC_BOOLEAN_FLAG_NAME); } @Autowired  RbacFilter(RestTemplate restTemplate, String authorizationUrl, ObjectMapper objectMapper); @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run();  }