use of org.springframework.security.web.debug.DebugFilter.DebugRequestWrapper in project spring-security by spring-projects.
the class DebugFilterTests method doFilterProcessesForwardedRequests.
// SEC-1901
@Test
public void doFilterProcessesForwardedRequests() throws Exception {
setupMocks();
given(this.request.getAttribute(this.requestAttr)).willReturn(Boolean.TRUE);
HttpServletRequest request = new DebugRequestWrapper(this.request);
this.filter.doFilter(request, this.response, this.filterChain);
verify(this.logger).info(anyString());
verify(this.fcp).doFilter(request, this.response, this.filterChain);
verify(this.request, never()).removeAttribute(this.requestAttr);
}
use of org.springframework.security.web.debug.DebugFilter.DebugRequestWrapper in project spring-security by spring-projects.
the class DebugFilterTests method doFilterDoesNotWrapWithDebugRequestWrapperAgain.
@Test
public void doFilterDoesNotWrapWithDebugRequestWrapperAgain() throws Exception {
setupMocks();
given(this.request.getAttribute(this.requestAttr)).willReturn(Boolean.TRUE);
HttpServletRequest fireWalledRequest = new HttpServletRequestWrapper(new DebugRequestWrapper(this.request));
this.filter.doFilter(fireWalledRequest, this.response, this.filterChain);
verify(this.fcp).doFilter(fireWalledRequest, this.response, this.filterChain);
}
Aggregations