@Component(value="blCustomerStateFilter")
public class CustomerStateFilter
extends org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter
This filter should be configured after the RememberMe listener from Spring Security. Retrieves the Broadleaf Customer based using the authenticated user OR creates an Anonymous customer and stores them in the session. Calls Customer.setCookied(true) if the authentication token is an instance of org.springframework.security.providers.rememberme.RememberMeAuthenticationToken). Calls Customer.setLoggedIn(true) if the authentication token is an instance of {@link org.springframework.security.providers.UsernamePasswordAuthenticationToken}
| Modifier and Type | Field and Description |
|---|---|
protected CustomerStateRequestProcessor |
customerStateProcessor |
| Constructor and Description |
|---|
CustomerStateFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
doFilterInternalUnlessIgnored(javax.servlet.http.HttpServletRequest baseRequest,
javax.servlet.http.HttpServletResponse baseResponse,
javax.servlet.FilterChain chain) |
int |
getOrder() |
protected boolean |
isIgnored(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
protected boolean |
shouldNotFilterErrorDispatch() |
doFilterInternaldoFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatchprotected CustomerStateRequestProcessor customerStateProcessor
public void doFilterInternalUnlessIgnored(javax.servlet.http.HttpServletRequest baseRequest,
javax.servlet.http.HttpServletResponse baseResponse,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilterInternalUnlessIgnored in class org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilterIOExceptionjavax.servlet.ServletExceptionprotected boolean isIgnored(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
isIgnored in class org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilterpublic int getOrder()
protected boolean shouldNotFilterErrorDispatch()
shouldNotFilterErrorDispatch in class org.springframework.web.filter.OncePerRequestFilterCopyright © 2017. All rights reserved.