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
Fields Modifier and Type Field Description protected CustomerConsentDataStrategy
customerConsentDataStrategy
-
Constructor Summary
Constructors Constructor Description StorefrontAuthenticationSuccessHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
determineTargetUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected org.springframework.security.core.GrantedAuthority
getAdminAuthority()
protected BruteForceAttackCounter
getBruteForceAttackCounter()
protected CartFacade
getCartFacade()
protected CartRestorationStrategy
getCartRestorationStrategy()
protected CustomerConsentDataStrategy
getCustomerConsentDataStrategy()
protected CustomerFacade
getCustomerFacade()
protected java.util.Map<UiExperienceLevel,java.lang.Boolean>
getForceDefaultTargetForUiExperienceLevel()
protected java.util.List<java.lang.String>
getListRedirectUrlsForceDefaultTarget()
protected java.util.List<java.lang.String>
getRestrictedPages()
protected UiExperienceService
getUiExperienceService()
protected void
invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected boolean
isAdminAuthority(org.springframework.security.core.Authentication authentication)
protected boolean
isAlwaysUseDefaultTargetUrl()
void
onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
void
setAdminGroup(java.lang.String adminGroup)
void
setBruteForceAttackCounter(BruteForceAttackCounter bruteForceAttackCounter)
void
setCartFacade(CartFacade cartFacade)
void
setCartRestorationStrategy(CartRestorationStrategy cartRestorationStrategy)
void
setCustomerConsentDataStrategy(CustomerConsentDataStrategy customerConsentDataStrategy)
void
setCustomerFacade(CustomerFacade customerFacade)
void
setForceDefaultTargetForUiExperienceLevel(java.util.Map<UiExperienceLevel,java.lang.Boolean> forceDefaultTargetForUiExperienceLevel)
void
setListRedirectUrlsForceDefaultTarget(java.util.List<java.lang.String> listRedirectUrlsForceDefaultTarget)
void
setRestrictedPages(java.util.List<java.lang.String> restrictedPages)
void
setUiExperienceService(UiExperienceService uiExperienceService)
-
Methods inherited from class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
setRequestCache
-
Methods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
clearAuthenticationAttributes
-
Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
-
-
-
-
Field Detail
-
customerConsentDataStrategy
protected CustomerConsentDataStrategy customerConsentDataStrategy
-
-
Method Detail
-
onAuthenticationSuccess
public void onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) throws java.io.IOException, javax.servlet.ServletException
- Specified by:
onAuthenticationSuccess
in interfaceorg.springframework.security.web.authentication.AuthenticationSuccessHandler
- Overrides:
onAuthenticationSuccess
in classorg.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
- Throws:
java.io.IOException
javax.servlet.ServletException
-
invalidateSession
protected void invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
isAdminAuthority
protected boolean isAdminAuthority(org.springframework.security.core.Authentication authentication)
-
getRestrictedPages
protected java.util.List<java.lang.String> getRestrictedPages()
-
setRestrictedPages
public void setRestrictedPages(java.util.List<java.lang.String> restrictedPages)
-
getCartFacade
protected CartFacade getCartFacade()
-
setCartFacade
public void setCartFacade(CartFacade cartFacade)
-
getCustomerFacade
protected CustomerFacade getCustomerFacade()
-
setCustomerFacade
public void setCustomerFacade(CustomerFacade customerFacade)
-
isAlwaysUseDefaultTargetUrl
protected boolean isAlwaysUseDefaultTargetUrl()
- Overrides:
isAlwaysUseDefaultTargetUrl
in classorg.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
-
determineTargetUrl
protected java.lang.String determineTargetUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Overrides:
determineTargetUrl
in classorg.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
-
getForceDefaultTargetForUiExperienceLevel
protected java.util.Map<UiExperienceLevel,java.lang.Boolean> getForceDefaultTargetForUiExperienceLevel()
-
setForceDefaultTargetForUiExperienceLevel
public void setForceDefaultTargetForUiExperienceLevel(java.util.Map<UiExperienceLevel,java.lang.Boolean> forceDefaultTargetForUiExperienceLevel)
-
getBruteForceAttackCounter
protected BruteForceAttackCounter getBruteForceAttackCounter()
-
setBruteForceAttackCounter
public void setBruteForceAttackCounter(BruteForceAttackCounter bruteForceAttackCounter)
-
getUiExperienceService
protected UiExperienceService getUiExperienceService()
-
setUiExperienceService
public void setUiExperienceService(UiExperienceService uiExperienceService)
-
getListRedirectUrlsForceDefaultTarget
protected java.util.List<java.lang.String> getListRedirectUrlsForceDefaultTarget()
-
setListRedirectUrlsForceDefaultTarget
public void setListRedirectUrlsForceDefaultTarget(java.util.List<java.lang.String> listRedirectUrlsForceDefaultTarget)
-
setAdminGroup
public void setAdminGroup(java.lang.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)
-
-