Class RequireHardLoginBeforeControllerHandler

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

public class RequireHardLoginBeforeControllerHandler extends Object implements BeforeControllerHandler
Intercepter class, adds an additional checks of manageMyBooking to the out of the box RequireHardLoginBeforeControllerHandler.
  • Field Details

  • Constructor Details

    • RequireHardLoginBeforeControllerHandler

      public RequireHardLoginBeforeControllerHandler()
  • Method Details

    • getLoginUrl

      protected String getLoginUrl()
    • setLoginUrl

      public void setLoginUrl(String loginUrl)
    • getRedirectStrategy

      protected org.springframework.security.web.RedirectStrategy getRedirectStrategy()
    • setRedirectStrategy

      public void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
    • getCookieGenerator

      protected org.springframework.web.util.CookieGenerator getCookieGenerator()
    • setCookieGenerator

      public void setCookieGenerator(org.springframework.web.util.CookieGenerator cookieGenerator)
    • getUserService

      protected de.hybris.platform.servicelayer.user.UserService getUserService()
    • setUserService

      public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
    • getLoginAndCheckoutUrl

      public String getLoginAndCheckoutUrl()
    • setLoginAndCheckoutUrl

      public void setLoginAndCheckoutUrl(String loginAndCheckoutUrl)
    • getSessionService

      protected de.hybris.platform.servicelayer.session.SessionService getSessionService()
    • setSessionService

      public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)
    • getCartService

      public de.hybris.platform.order.CartService getCartService()
    • setCartService

      public void setCartService(de.hybris.platform.order.CartService cartService)
    • beforeController

      public boolean beforeController(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.web.method.HandlerMethod handler) throws Exception
      All the pages that are protected by @RequiredHandLogin annotation are checked for the rightful authorization been done, if not, forces the customer to the Login page. In this overridden method, additional to the out of the box checks, Manage my booking check has been added as all ManageMyBooking pages are protected with @RequiredHandLogin annotation.
      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:
      Exception - in case of errors
    • manageMyBookingLogin

      protected boolean manageMyBookingLogin()
      Returns true, if there exists a session attribute "manage_my_booking_authentication" indicating that manageMyBooking authentication has been done.
      Returns:
    • checkForGUIDCookie

      protected boolean checkForGUIDCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String guid)
    • isGuidStoredinCookies

      protected boolean isGuidStoredinCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String guid, String guidCookieName)
    • checkForAnonymousCheckout

      protected boolean checkForAnonymousCheckout()
    • getRedirectUrl

      protected String getRedirectUrl(javax.servlet.http.HttpServletRequest request)
    • findAnnotation

      protected <T extends Annotation> T findAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<T> annotationType)