Class HybrisOauth2UserFilter
java.lang.Object
de.hybris.platform.commercewebservices.core.oauth2.HybrisOauth2UserFilter
- All Implemented Interfaces:
javax.servlet.Filter
Filter sets current user by userService depending on current principal.
This should happen only when there is a customer context. Anonymous credentials are also applicable, because special 'anonymous' user is available for that purpose. Customer context is not available during client credential flow.
This should happen only when there is a customer context. Anonymous credentials are also applicable, because special 'anonymous' user is available for that purpose. Customer context is not available during client credential flow.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancontainsRole(org.springframework.security.core.Authentication auth, String role) voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) voidinit(javax.servlet.FilterConfig arg0)
-
Constructor Details
-
HybrisOauth2UserFilter
public HybrisOauth2UserFilter()
-
-
Method Details
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
init
public void init(javax.servlet.FilterConfig arg0) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
containsRole
protected static boolean containsRole(org.springframework.security.core.Authentication auth, String role)
-