Class ClientTokenPreAuthFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
com.emc.documentum.rest.security.filter.ClientTokenPreAuthFilter
- All Implemented Interfaces:
jakarta.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
public class ClientTokenPreAuthFilter
extends org.springframework.web.filter.GenericFilterBean
Filter to logout for client token cookie/header
-
Field Summary
FieldsFields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) Filter the request and the response.protected void
onSuccessfulAuthentication
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ClientTokenAuthToken authResult) protected void
onUnsuccessfulAuthentication
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) void
setAuthenticationManager
(org.springframework.security.authentication.AuthenticationManager authenticationManager) Set the authentication managerMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
CLIENT_TOKEN_ERROR
- See Also:
-
-
Constructor Details
-
ClientTokenPreAuthFilter
public ClientTokenPreAuthFilter()Default constructor
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException Filter the request and the response. The filter validates the client token cookie/header and sets theClientTokenAuthToken
to the security context once the client token is validated. Optionally, it can validate the CSRF token associated with the client token cookie/header.- Parameters:
req
- servlet requestres
- servlet requestchain
- servlet chain- Throws:
IOException
- when there are errors in the authenticationjakarta.servlet.ServletException
- when there are errors in the authentication
-
setAuthenticationManager
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager) Set the authentication manager- Parameters:
authenticationManager
- the authentication manager
-
onSuccessfulAuthentication
protected void onSuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ClientTokenAuthToken authResult) -
onUnsuccessfulAuthentication
protected void onUnsuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed)
-