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 Summary
ConstructorDescriptionCsrfLoginCookieProvider
(CsrfTokenGenerator<io.micronaut.http.HttpRequest<?>> csrfTokenGenerator, CsrfConfiguration csrfConfiguration) -
Method Summary
Modifier and TypeMethodDescription@NonNull io.micronaut.http.cookie.Cookie
provideCookie
(@NonNull io.micronaut.http.HttpRequest<?> request)
-
Constructor Details
-
CsrfLoginCookieProvider
public CsrfLoginCookieProvider(CsrfTokenGenerator<io.micronaut.http.HttpRequest<?>> csrfTokenGenerator, CsrfConfiguration csrfConfiguration) - Parameters:
csrfTokenGenerator
- CSRF Token GeneratorcsrfConfiguration
- 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 interfaceLoginCookieProvider<io.micronaut.http.HttpRequest<?>>
-