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 Summary
Modifier and TypeFieldDescriptionprotected final AccessTokenCookieConfiguration
protected final @Nullable String
protected final RefreshTokenCookieConfiguration
-
Constructor Summary
ConstructorDescriptionTokenCookieClearerLogoutHandler
(AccessTokenCookieConfiguration accessTokenCookieConfiguration, RefreshTokenCookieConfiguration refreshTokenCookieConfiguration, RedirectConfiguration redirectConfiguration, RedirectService redirectService) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.MutableHttpResponse<?>
logout
(io.micronaut.http.HttpRequest<?> request)
-
Field Details
-
logout
-
accessTokenCookieConfiguration
-
refreshTokenCookieConfiguration
-
-
Constructor Details
-
TokenCookieClearerLogoutHandler
public TokenCookieClearerLogoutHandler(AccessTokenCookieConfiguration accessTokenCookieConfiguration, RefreshTokenCookieConfiguration refreshTokenCookieConfiguration, RedirectConfiguration redirectConfiguration, RedirectService redirectService) - Parameters:
accessTokenCookieConfiguration
- JWT Cookie ConfigurationrefreshTokenCookieConfiguration
- Refresh token cookie configurationredirectConfiguration
- Redirect configurationredirectService
- Redirection Service
-
-
Method Details
-
logout
public io.micronaut.http.MutableHttpResponse<?> logout(io.micronaut.http.HttpRequest<?> request) - Specified by:
logout
in interfaceLogoutHandler<io.micronaut.http.HttpRequest<?>,
io.micronaut.http.MutableHttpResponse<?>> - Parameters:
request
- The HTTP Request being executed- Returns:
- An HttpResponse built after the user logs out
-