Class StorefrontAuthenticationSuccessHandler
java.lang.Object
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
de.hybris.platform.acceleratorstorefrontcommons.security.StorefrontAuthenticationSuccessHandler
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationSuccessHandler
public class StorefrontAuthenticationSuccessHandler
extends org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
Success handler initializing user settings, restoring or merging the cart and ensuring the cart is handled correctly.
Cart restoration is stored in the session since the request coming in is that to j_spring_security_check and will be
redirected.
-
Field Summary
FieldsFields inherited from class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdetermineTargetUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected org.springframework.security.core.GrantedAuthorityprotected BruteForceAttackCounterprotected de.hybris.platform.commercefacades.order.CartFacadeprotected CartRestorationStrategyprotected CustomerConsentDataStrategyprotected de.hybris.platform.commercefacades.customer.CustomerFacadeprotected Map<UiExperienceLevel,Boolean> protected de.hybris.platform.acceleratorservices.uiexperience.UiExperienceServiceprotected voidinvalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected booleanisAdminAuthority(org.springframework.security.core.Authentication authentication) protected booleanvoidonAuthenticationSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) voidsetAdminGroup(String adminGroup) voidsetBruteForceAttackCounter(BruteForceAttackCounter bruteForceAttackCounter) voidsetCartFacade(de.hybris.platform.commercefacades.order.CartFacade cartFacade) voidsetCartRestorationStrategy(CartRestorationStrategy cartRestorationStrategy) voidsetCustomerConsentDataStrategy(CustomerConsentDataStrategy customerConsentDataStrategy) voidsetCustomerFacade(de.hybris.platform.commercefacades.customer.CustomerFacade customerFacade) voidsetForceDefaultTargetForUiExperienceLevel(Map<UiExperienceLevel, Boolean> forceDefaultTargetForUiExperienceLevel) voidsetListRedirectUrlsForceDefaultTarget(List<String> listRedirectUrlsForceDefaultTarget) voidsetRestrictedPages(List<String> restrictedPages) voidsetUiExperienceService(de.hybris.platform.acceleratorservices.uiexperience.UiExperienceService uiExperienceService) Methods inherited from class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
setRequestCacheMethods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
clearAuthenticationAttributesMethods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseRefererMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
onAuthenticationSuccess
-
Field Details
-
customerConsentDataStrategy
-
-
Constructor Details
-
StorefrontAuthenticationSuccessHandler
public StorefrontAuthenticationSuccessHandler()
-
-
Method Details
-
onAuthenticationSuccess
public void onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) throws IOException, javax.servlet.ServletException - Specified by:
onAuthenticationSuccessin interfaceorg.springframework.security.web.authentication.AuthenticationSuccessHandler- Overrides:
onAuthenticationSuccessin classorg.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler- Throws:
IOExceptionjavax.servlet.ServletException
-
invalidateSession
protected void invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-
isAdminAuthority
protected boolean isAdminAuthority(org.springframework.security.core.Authentication authentication) -
getRestrictedPages
-
setRestrictedPages
-
getCartFacade
protected de.hybris.platform.commercefacades.order.CartFacade getCartFacade() -
setCartFacade
public void setCartFacade(de.hybris.platform.commercefacades.order.CartFacade cartFacade) -
getCustomerFacade
protected de.hybris.platform.commercefacades.customer.CustomerFacade getCustomerFacade() -
setCustomerFacade
public void setCustomerFacade(de.hybris.platform.commercefacades.customer.CustomerFacade customerFacade) -
isAlwaysUseDefaultTargetUrl
protected boolean isAlwaysUseDefaultTargetUrl()- Overrides:
isAlwaysUseDefaultTargetUrlin classorg.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
-
determineTargetUrl
protected String determineTargetUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) - Overrides:
determineTargetUrlin classorg.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
-
getForceDefaultTargetForUiExperienceLevel
-
setForceDefaultTargetForUiExperienceLevel
public void setForceDefaultTargetForUiExperienceLevel(Map<UiExperienceLevel, Boolean> forceDefaultTargetForUiExperienceLevel) -
getBruteForceAttackCounter
-
setBruteForceAttackCounter
-
getUiExperienceService
protected de.hybris.platform.acceleratorservices.uiexperience.UiExperienceService getUiExperienceService() -
setUiExperienceService
public void setUiExperienceService(de.hybris.platform.acceleratorservices.uiexperience.UiExperienceService uiExperienceService) -
getListRedirectUrlsForceDefaultTarget
-
setListRedirectUrlsForceDefaultTarget
-
setAdminGroup
- Parameters:
adminGroup- the adminGroup to set
-
getAdminAuthority
protected org.springframework.security.core.GrantedAuthority getAdminAuthority() -
getCartRestorationStrategy
-
setCartRestorationStrategy
-
getCustomerConsentDataStrategy
-
setCustomerConsentDataStrategy
-