Class ClientTokenPostAuthFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
com.emc.documentum.rest.security.filter.ClientTokenPostAuthFilter
- 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 ClientTokenPostAuthFilter
extends org.springframework.web.filter.GenericFilterBean
Filter to set response cookies and headers for authenticated client token authentication token
-
Field Summary
Fields 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.Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Constructor Details
-
ClientTokenPostAuthFilter
public ClientTokenPostAuthFilter()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 checks the authentication token and in case the token isClientTokenAuthToken
and it requires to set back the cookie/header, the filter sets back the client token cookie/header and optionally sets the CSRF response headers. If the client token authentication token has set redirect URI in itsClientTokenAuthToken.getRedirectUri()
, the response will be redirected to the target URI directly; otherwise, the chain continues to filter the request.- 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
-