user1578872
user1578872

Reputation: 9098

Spring webflux security CSRF token repository

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

Answers (1)

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

Related Questions