Class SecurityUserCheckBeforeControllerHandler

java.lang.Object
de.hybris.platform.travelacceleratorstorefront.interceptors.beforecontroller.SecurityUserCheckBeforeControllerHandler
All Implemented Interfaces:
BeforeControllerHandler

public class SecurityUserCheckBeforeControllerHandler extends Object implements BeforeControllerHandler
Spring MVC interceptor that validates that the spring security user and the hybris session user are in sync. If the spring security user and the hybris session user are not in sync then the session is invalidated and the visitor is redirect to the homepage.
  • Constructor Details

    • SecurityUserCheckBeforeControllerHandler

      public SecurityUserCheckBeforeControllerHandler()
  • Method Details

    • beforeController

      public boolean beforeController(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.web.method.HandlerMethod handler) throws IOException
      Description copied from interface: BeforeControllerHandler
      Called before the DispatcherServlet calls the controller.
      Specified by:
      beforeController in interface BeforeControllerHandler
      Parameters:
      request - current HTTP request
      response - current HTTP response
      Returns:
      true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherServlet assumes that this interceptor has already dealt with the response itself.
      Throws:
      IOException
    • isPreviewDataModelValid

      protected boolean isPreviewDataModelValid(javax.servlet.http.HttpServletRequest httpRequest)
      Checks whether there is a preview data setup for the current request
      Parameters:
      httpRequest - current request
      Returns:
      true whether is valid otherwise false