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 Details

  • 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:
      onAuthenticationSuccess in interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
      Overrides:
      onAuthenticationSuccess in class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
      Throws:
      IOException
      javax.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

      protected List<String> getRestrictedPages()
    • setRestrictedPages

      public void setRestrictedPages(List<String> restrictedPages)
    • 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:
      isAlwaysUseDefaultTargetUrl in class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
    • determineTargetUrl

      protected String determineTargetUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Overrides:
      determineTargetUrl in class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
    • getForceDefaultTargetForUiExperienceLevel

      protected Map<UiExperienceLevel,Boolean> getForceDefaultTargetForUiExperienceLevel()
    • setForceDefaultTargetForUiExperienceLevel

      public void setForceDefaultTargetForUiExperienceLevel(Map<UiExperienceLevel,Boolean> forceDefaultTargetForUiExperienceLevel)
    • getBruteForceAttackCounter

      protected BruteForceAttackCounter getBruteForceAttackCounter()
    • setBruteForceAttackCounter

      public void setBruteForceAttackCounter(BruteForceAttackCounter bruteForceAttackCounter)
    • getUiExperienceService

      protected de.hybris.platform.acceleratorservices.uiexperience.UiExperienceService getUiExperienceService()
    • setUiExperienceService

      public void setUiExperienceService(de.hybris.platform.acceleratorservices.uiexperience.UiExperienceService uiExperienceService)
    • getListRedirectUrlsForceDefaultTarget

      protected List<String> getListRedirectUrlsForceDefaultTarget()
    • setListRedirectUrlsForceDefaultTarget

      public void setListRedirectUrlsForceDefaultTarget(List<String> listRedirectUrlsForceDefaultTarget)
    • setAdminGroup

      public void setAdminGroup(String adminGroup)
      Parameters:
      adminGroup - the adminGroup to set
    • getAdminAuthority

      protected org.springframework.security.core.GrantedAuthority getAdminAuthority()
    • getCartRestorationStrategy

      protected CartRestorationStrategy getCartRestorationStrategy()
    • setCartRestorationStrategy

      public void setCartRestorationStrategy(CartRestorationStrategy cartRestorationStrategy)
    • getCustomerConsentDataStrategy

      protected CustomerConsentDataStrategy getCustomerConsentDataStrategy()
    • setCustomerConsentDataStrategy

      public void setCustomerConsentDataStrategy(CustomerConsentDataStrategy customerConsentDataStrategy)