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 Type
    Method
    Description
    @NonNull io.micronaut.http.cookie.Cookie
    provideCookie(@NonNull T request)
     
    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.
  • Method Details

    • provideCookie

      @NonNull io.micronaut.http.cookie.Cookie provideCookie(@NonNull T request)
    • 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 to provideCookie(Object).
      Parameters:
      request - Request
      authentication - The authenticated user's representation
      Returns:
      A Cookie
      Since:
      5.5.2