Reputation: 9098
I am using Spring webflux security. Here, csrfTokenRepository expects ServerCsrfTokenRepository and seeing error with the below sample. Is there any default implementation?
.csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
Upvotes: 0
Views: 590
Reputation: 6499
You can use CookieServerCsrfTokenRepository.withHttpOnlyFalse()
.
CookieCsrfTokenRepository
is the servlet equivalent of CookieServerCsrfTokenRepository
, which is why it gives an error in a WebFlux application.
Upvotes: 3