Class UserMatchingFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
de.hybris.platform.commercewebservices.core.v2.filter.AbstractUrlMatchingFilter
de.hybris.platform.commercewebservices.core.v2.filter.UserMatchingFilter
- All Implemented Interfaces:
javax.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
Filter that puts user from the requested url into the session.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class de.hybris.platform.commercewebservices.core.v2.filter.AbstractUrlMatchingFilter
BASE_SITES_ENDPOINT_PATHFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields inherited from class org.springframework.web.filter.GenericFilterBean
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) protected org.springframework.security.core.AuthenticationgetAuth()protected Stringprotected SessionServicegetUserForValidProperty(String principal, String propertyValue) protected StringgetUserIdFromRequest(javax.servlet.http.HttpServletRequest request, org.springframework.security.core.Authentication auth) protected UserMatchingServiceprotected UserServiceprotected booleanprotected voidsetCurrentUser(UserModel user) protected voidsetCurrentUser(String id) protected voidsetCurrentUserForCustomerGroupRole(String principal, String userID) voidvoidsetSessionService(SessionService sessionService) voidsetUserMatchingService(UserMatchingService userMatchingService) voidsetUserService(UserService userService) Methods inherited from class de.hybris.platform.commercewebservices.core.v2.filter.AbstractUrlMatchingFilter
getBaseSiteValue, getMatcher, getPath, getValue, getValue, matchesUrlMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
ROLE_ANONYMOUS
- See Also:
-
ROLE_CUSTOMERGROUP
- See Also:
-
ROLE_CUSTOMERMANAGERGROUP
- See Also:
-
ROLE_TRUSTED_CLIENT
- See Also:
-
HTTP_HEADER_NAME_USER_ID
- See Also:
-
-
Constructor Details
-
UserMatchingFilter
public UserMatchingFilter()
-
-
Method Details
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException - Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
javax.servlet.ServletExceptionIOException
-
hasRole
-
getUserIdFromRequest
protected String getUserIdFromRequest(javax.servlet.http.HttpServletRequest request, org.springframework.security.core.Authentication auth) -
setCurrentUser
-
setCurrentUser
-
setCurrentUserForCustomerGroupRole
-
getUserForValidProperty
-
getAuth
protected org.springframework.security.core.Authentication getAuth() -
getRegexp
-
setRegexp
-
getUserService
-
setUserService
-
getSessionService
-
setSessionService
-
getUserMatchingService
-
setUserMatchingService
-