Class RememberMeLoginAuthenticationConfigurer
java.lang.Object
com.broadleafcommerce.auth.authorization.security.rememberme.autoconfigure.RememberMeLoginAuthenticationConfigurer
Responsible for configuring 'Remember Me' support in the authentication security filter chain in
SecurityAutoConfiguration
.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRememberMeLoginAuthenticationConfigurer
(org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter rememberMeAuthenticationFilter, RememberMeLoginProperties rememberMeLoginProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Note - we explicitly avoid using the first-classHttpSecurity.rememberMe(Customizer)
DSL since it hard-codes certain configuration such as theRememberMeAuthenticationFilter
and is not fully overridable.protected org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
protected RememberMeLoginProperties
protected void
registerFilter
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Spring's official documentation says the remember me filter is typically placed immediately after theUsernamePasswordAuthenticationFilter
(or, in our case, theFormLoginAuthenticationFilter
).
-
Constructor Details
-
RememberMeLoginAuthenticationConfigurer
public RememberMeLoginAuthenticationConfigurer(org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter rememberMeAuthenticationFilter, RememberMeLoginProperties rememberMeLoginProperties)
-
-
Method Details
-
configure
public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception Note - we explicitly avoid using the first-classHttpSecurity.rememberMe(Customizer)
DSL since it hard-codes certain configuration such as theRememberMeAuthenticationFilter
and is not fully overridable. Instead, we manually define the various configurations ourselves.- Parameters:
http
- the authentication security filter chain customizing object- Throws:
Exception
- if something goes wrong
-
registerFilter
protected void registerFilter(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Spring's official documentation says the remember me filter is typically placed immediately after the
UsernamePasswordAuthenticationFilter
(or, in our case, theFormLoginAuthenticationFilter
).However, in our
BroadleafRememberMeAuthenticationFilter
implementation, we have special behavioral expectations. Please reviewBroadleafRememberMeAuthenticationFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
for more details on their interaction and the motivation behind the filter's ordering.- Parameters:
http
- the authentication filter chain
-
getRememberMeAuthenticationFilter
protected org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter getRememberMeAuthenticationFilter() -
getRememberMeLoginProperties
-