use of org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter in project spring-security by spring-projects.
the class RememberMeConfigurer method configure.
@Override
public void configure(H http) {
RememberMeAuthenticationFilter rememberMeFilter = new RememberMeAuthenticationFilter(http.getSharedObject(AuthenticationManager.class), this.rememberMeServices);
if (this.authenticationSuccessHandler != null) {
rememberMeFilter.setAuthenticationSuccessHandler(this.authenticationSuccessHandler);
}
rememberMeFilter = postProcess(rememberMeFilter);
http.addFilter(rememberMeFilter);
}
use of org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter in project kylo by Teradata.
the class KerberosWebSecurityConfigurer method configure.
@Override
@SuppressWarnings("unchecked")
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http.removeConfigurer(LogoutConfigurer.class);
http.csrf().disable().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling().authenticationEntryPoint(spnegoEntryPoint).and().authorizeRequests().antMatchers("/**").authenticated().and().rememberMe().rememberMeServices(rememberMeServices).and().httpBasic().and().addFilterBefore(new RememberMeAuthenticationFilter(auth -> auth, rememberMeServices), BasicAuthenticationFilter.class).addFilterAfter(spnegoFilter(), RememberMeAuthenticationFilter.class).addFilterAfter(logoutFilter(), BasicAuthenticationFilter.class);
// @formatter:on
}
use of org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter in project kylo by Teradata.
the class DefaultWebSecurityConfigurer method configure.
@Override
@SuppressWarnings("unchecked")
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http.removeConfigurer(LogoutConfigurer.class);
http.authenticationProvider(this.authenticationProvider).csrf().disable().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().authorizeRequests().antMatchers("/**").authenticated().and().rememberMe().rememberMeServices(rememberMeServices).and().httpBasic().and().addFilterBefore(new JaasHttpCallbackHandlerFilter(), BasicAuthenticationFilter.class).addFilterBefore(new RememberMeAuthenticationFilter(auth -> auth, rememberMeServices), BasicAuthenticationFilter.class).addFilterAfter(logoutFilter(), BasicAuthenticationFilter.class);
// @formatter:on
}
use of org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter in project kylo by Teradata.
the class KerberosWebSecurityConfigurer method configure.
@Override
@SuppressWarnings("unchecked")
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http.removeConfigurer(LogoutConfigurer.class);
http.csrf().disable().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling().authenticationEntryPoint(spnegoEntryPoint).and().authorizeRequests().antMatchers("/login", "/login/**", "/login**").permitAll().antMatchers("/**").authenticated().and().formLogin().usernameParameter("username").passwordParameter("password").loginPage("/login.html").loginProcessingUrl("/login").failureUrl("/login.html?error=true").permitAll().and().logout().permitAll().and().rememberMe().rememberMeServices(rememberMeServices).and().addFilterBefore(new RememberMeAuthenticationFilter(auth -> auth, rememberMeServices), BasicAuthenticationFilter.class).addFilterAfter(spnegoFilter(), RememberMeAuthenticationFilter.class).httpBasic();
// @formatter:on
}
Aggregations