Interface LoginCookieProvider<T>
- Type Parameters:
T- Request
- All Known Implementing Classes:
CsrfLoginCookieProvider
public interface LoginCookieProvider<T>
Provides a Cookie which will be included in the login response.
- Since:
- 4.11.0
- Author:
- Sergio del Amo
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.micronaut.http.cookie.CookieprovideCookie(@NonNull T request) default @NonNull io.micronaut.http.cookie.CookieprovideCookie(@NonNull T request, @NonNull Authentication authentication) Provides a Cookie which will be included in the login response of the supplied authenticated user.
-
Method Details
-
provideCookie
-
provideCookie
default @NonNull io.micronaut.http.cookie.Cookie provideCookie(@NonNull T request, @NonNull Authentication authentication) Provides a Cookie which will be included in the login response of the supplied authenticated user. Implementations which issue a value that should be bound to the authenticated user, for example a signed CSRF token, should override this method, as the login request itself does not carry the authentication yet. The default implementation delegates toprovideCookie(Object).- Parameters:
request- Requestauthentication- The authenticated user's representation- Returns:
- A Cookie
- Since:
- 5.5.2
-