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

    • TokenCookieLoginHandler

      public TokenCookieLoginHandler(RedirectService redirectService, RedirectConfiguration redirectConfiguration, AccessTokenCookieConfiguration accessTokenCookieConfiguration, RefreshTokenCookieConfiguration refreshTokenCookieConfiguration, AccessTokenConfiguration accessTokenConfiguration, AccessRefreshTokenGenerator accessRefreshTokenGenerator, @Nullable @Nullable PriorToLoginPersistence<io.micronaut.http.HttpRequest<?>,io.micronaut.http.MutableHttpResponse<?>> priorToLoginPersistence)
      Parameters:
      redirectService - Redirection Service
      redirectConfiguration - Redirect configuration
      accessTokenCookieConfiguration - JWT Access Token Cookie Configuration
      refreshTokenCookieConfiguration - Refresh Token Cookie Configuration
      accessTokenConfiguration - JWT Generator Configuration
      accessRefreshTokenGenerator - Access Refresh Token Generator
      priorToLoginPersistence - Prior To Login Persistence Mechanism
  • 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