Class CsrfLoginCookieProvider

java.lang.Object
io.micronaut.security.csrf.repository.CsrfLoginCookieProvider
All Implemented Interfaces:
LoginCookieProvider<io.micronaut.http.HttpRequest<?>>

@Requires(classes=io.micronaut.http.HttpRequest.class) @Singleton public class CsrfLoginCookieProvider extends Object implements LoginCookieProvider<io.micronaut.http.HttpRequest<?>>
Provides a CSRF Cookie which can be included in the login response.
Since:
4.11.0
Author:
Sergio del Amo
  • Constructor Details

    • CsrfLoginCookieProvider

      public CsrfLoginCookieProvider(CsrfTokenGenerator<io.micronaut.http.HttpRequest<?>> csrfTokenGenerator, CsrfConfiguration csrfConfiguration)
      Parameters:
      csrfTokenGenerator - CSRF Token Generator
      csrfConfiguration - CSRF Configuration
  • Method Details

    • provideCookie

      @NonNull public @NonNull io.micronaut.http.cookie.Cookie provideCookie(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request)
      Specified by:
      provideCookie in interface LoginCookieProvider<io.micronaut.http.HttpRequest<?>>