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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbeforeController(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.web.method.HandlerMethod handler) 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.protected booleanprotected booleancheckForGUIDCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String guid) protected <T extends Annotation>
TfindAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<T> annotationType) de.hybris.platform.order.CartServiceprotected org.springframework.web.util.CookieGeneratorprotected Stringprotected org.springframework.security.web.RedirectStrategyprotected StringgetRedirectUrl(javax.servlet.http.HttpServletRequest request) protected de.hybris.platform.servicelayer.session.SessionServiceprotected de.hybris.platform.servicelayer.user.UserServiceprotected booleanisGuidStoredinCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String guid, String guidCookieName) protected booleanReturns true, if there exists a session attribute "manage_my_booking_authentication" indicating that manageMyBooking authentication has been done.voidsetCartService(de.hybris.platform.order.CartService cartService) voidsetCookieGenerator(org.springframework.web.util.CookieGenerator cookieGenerator) voidsetLoginAndCheckoutUrl(String loginAndCheckoutUrl) voidsetLoginUrl(String loginUrl) voidsetRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy) voidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService)
-
Field Details
-
SECURE_GUID_SESSION_KEY
- See Also:
-
-
Constructor Details
-
RequireHardLoginBeforeControllerHandler
public RequireHardLoginBeforeControllerHandler()
-
-
Method Details
-
getLoginUrl
-
setLoginUrl
-
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
-
setLoginAndCheckoutUrl
-
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:
beforeControllerin interfaceBeforeControllerHandler- Parameters:
request- current HTTP requestresponse- current HTTP response- Returns:
trueif 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
-
checkForAnonymousCheckout
protected boolean checkForAnonymousCheckout() -
getRedirectUrl
-
findAnnotation
protected <T extends Annotation> T findAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<T> annotationType)
-