Class WMRememberMeAuthenticationFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
com.wavemaker.runtime.security.rememberme.WMRememberMeAuthenticationFilter
- 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.ApplicationEventPublisherAware,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
public class WMRememberMeAuthenticationFilter
extends org.springframework.web.filter.GenericFilterBean
implements org.springframework.context.ApplicationEventPublisherAware
-
Field Summary
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger -
Constructor Summary
ConstructorsConstructorDescriptionWMRememberMeAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager, org.springframework.security.web.authentication.RememberMeServices rememberMeServices) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddoFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) org.springframework.security.web.authentication.RememberMeServicesprotected voidonUnsuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) Called if theAuthenticationManagerrejects the authentication object returned from theRememberMeServicesautoLoginmethod.voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher) voidsetAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler) Allows control over the destination a remembered user is sent to when they are successfully authenticated.voidsetSecurityContextRepository(org.springframework.security.web.context.SecurityContextRepository securityContextRepository) Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Constructor Details
-
WMRememberMeAuthenticationFilter
public WMRememberMeAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager, org.springframework.security.web.authentication.RememberMeServices rememberMeServices)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.web.filter.GenericFilterBean
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
onUnsuccessfulAuthentication
protected void onUnsuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) Called if theAuthenticationManagerrejects the authentication object returned from theRememberMeServicesautoLoginmethod. This method will not be called when no remember-me token is present in the request andautoLoginreurns null. -
getRememberMeServices
public org.springframework.security.web.authentication.RememberMeServices getRememberMeServices() -
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher) - Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
setAuthenticationSuccessHandler
public void setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler) Allows control over the destination a remembered user is sent to when they are successfully authenticated. By default, the filter will just allow the current request to proceed, but if anAuthenticationSuccessHandleris set, it will be invoked and thedoFilter()method will return immediately, thus allowing the application to redirect the user to a specific URL, regardless of whatthe original request was for.- Parameters:
successHandler- the strategy to invoke immediately before returning fromdoFilter().
-
setSecurityContextRepository
public void setSecurityContextRepository(org.springframework.security.web.context.SecurityContextRepository securityContextRepository)
-