Class TokenCookieClearerLogoutHandler

java.lang.Object
io.micronaut.security.token.cookie.TokenCookieClearerLogoutHandler
All Implemented Interfaces:
LogoutHandler<io.micronaut.http.HttpRequest<?>,io.micronaut.http.MutableHttpResponse<?>>

@Requires(classes={io.micronaut.http.MutableHttpResponse.class,io.micronaut.http.HttpRequest.class}) @Requires(condition=CookieBasedAuthenticationModeCondition.class) @Singleton public class TokenCookieClearerLogoutHandler extends Object implements LogoutHandler<io.micronaut.http.HttpRequest<?>,io.micronaut.http.MutableHttpResponse<?>>
Clears the cookie configured via CookieLoginHandler.
Since:
1.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

    • TokenCookieClearerLogoutHandler

      public TokenCookieClearerLogoutHandler(AccessTokenCookieConfiguration accessTokenCookieConfiguration, RefreshTokenCookieConfiguration refreshTokenCookieConfiguration, RedirectConfiguration redirectConfiguration, RedirectService redirectService)
      Parameters:
      accessTokenCookieConfiguration - JWT Cookie Configuration
      refreshTokenCookieConfiguration - Refresh token cookie configuration
      redirectConfiguration - Redirect configuration
      redirectService - Redirection Service
  • Method Details

    • logout

      public io.micronaut.http.MutableHttpResponse<?> logout(io.micronaut.http.HttpRequest<?> request)
      Specified by:
      logout in interface LogoutHandler<io.micronaut.http.HttpRequest<?>,io.micronaut.http.MutableHttpResponse<?>>
      Parameters:
      request - The HTTP Request being executed
      Returns:
      An HttpResponse built after the user logs out