use of org.springframework.security.web.csrf.CsrfTokenRepository in project spring-security by spring-projects.
the class SecurityMockMvcRequestPostProcessorsCsrfDebugFilterTests method findCookieCsrfTokenRepository.
// SEC-3836
@Test
public void findCookieCsrfTokenRepository() throws Exception {
MockHttpServletRequest request = post("/").buildRequest(wac.getServletContext());
CsrfTokenRepository csrfTokenRepository = WebTestUtils.getCsrfTokenRepository(request);
assertThat(csrfTokenRepository).isNotNull();
assertThat(csrfTokenRepository).isEqualTo(Config.cookieCsrfTokenRepository);
}
Aggregations