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
    Constructor
    Description
    Constructor for LogoutService.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onLogoutSuccess(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      onLogoutSuccess in interface org.springframework.security.web.authentication.logout.LogoutSuccessHandler
      Overrides:
      onLogoutSuccess in class org.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.