Class LogoutService
java.lang.Object
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
callofproject.dev.authentication.service.LogoutService
- All Implemented Interfaces:
org.springframework.security.web.authentication.logout.LogoutSuccessHandler
@Service("ad")
@Lazy
public class LogoutService
extends org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
implements org.springframework.security.web.authentication.logout.LogoutSuccessHandler
Service class for handling logout operations.
-
Field Summary
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonLogoutSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) Handles logout success.Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
determineTargetUrl, determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
-
Constructor Details
-
LogoutService
public LogoutService()Constructor for LogoutService.
-
-
Method Details
-
onLogoutSuccess
public void onLogoutSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) throws IOException, jakarta.servlet.ServletException Handles logout success.- Specified by:
onLogoutSuccessin interfaceorg.springframework.security.web.authentication.logout.LogoutSuccessHandler- Overrides:
onLogoutSuccessin classorg.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler- Parameters:
request- The HttpServletRequest.response- The HttpServletResponse.authentication- The Authentication object representing the user.- Throws:
IOException- If an input or output exception occurs during the operation.jakarta.servlet.ServletException- If a servlet exception occurs during the operation.
-