Class TokenCookieLoginHandler

java.lang.Object
io.micronaut.security.token.cookie.CookieLoginHandler
io.micronaut.security.token.cookie.TokenCookieLoginHandler
All Implemented Interfaces:
LoginHandler<io.micronaut.http.HttpRequest<?>,io.micronaut.http.MutableHttpResponse<?>>, RedirectingLoginHandler<io.micronaut.http.HttpRequest<?>,io.micronaut.http.MutableHttpResponse<?>>

@Requires(classes=io.micronaut.http.HttpRequest.class) @Requires(property="micronaut.security.authentication",value="cookie") @Singleton public class TokenCookieLoginHandler extends CookieLoginHandler
Since:
1.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

  • Method Details

    • getCookies

      public List<io.micronaut.http.cookie.Cookie> getCookies(Authentication authentication, io.micronaut.http.HttpRequest<?> request)
      Description copied from class: CookieLoginHandler
      Return the cookies for the given parameters. This method will generate new cookies based on the current configuration.
      Specified by:
      getCookies in class CookieLoginHandler
      Parameters:
      authentication - The Authenticated user's representation
      request - The current request
      Returns:
      A list of cookies
    • getCookies

      public List<io.micronaut.http.cookie.Cookie> getCookies(Authentication authentication, String refreshToken, io.micronaut.http.HttpRequest<?> request)
      Description copied from class: CookieLoginHandler
      Return the cookies for the given parameters. This method will generate new cookies based on the current configuration.
      Specified by:
      getCookies in class CookieLoginHandler
      Parameters:
      authentication - The Authenticated user's representation
      refreshToken - The access refresh token
      request - The current request
      Returns:
      A list of cookies
    • getCookies

      protected List<io.micronaut.http.cookie.Cookie> getCookies(AccessRefreshToken accessRefreshToken, io.micronaut.http.HttpRequest<?> request)
      Return the cookies for the given parameters.
      Parameters:
      accessRefreshToken - The access refresh token
      request - The current request
      Returns:
      A list of cookies
    • accessTokenCookie

      @NonNull protected @NonNull io.micronaut.http.cookie.Cookie accessTokenCookie(@NonNull @NonNull AccessRefreshToken accessRefreshToken, @NonNull @NonNull io.micronaut.http.HttpRequest<?> request)
      Instantiates an Access Token Cookie.
      Parameters:
      accessRefreshToken - The access refresh token
      request - The current request
      Returns:
      Access Token Cookie
    • refreshTokenCookie

      @NonNull protected @NonNull Optional<io.micronaut.http.cookie.Cookie> refreshTokenCookie(@NonNull @NonNull AccessRefreshToken accessRefreshToken, @NonNull @NonNull io.micronaut.http.HttpRequest<?> request)
      Instantiates a Refresh Token Cookie.
      Parameters:
      accessRefreshToken - The access refresh token
      request - The current request
      Returns:
      Refresh Token Cookie