Migrate to AuthorizationFilter in Spring Security auto-config
This commit updates Servlet based Spring Security auto-configuration to use AuthorizationFilter, which is intended to supersede FilterSecurityInterceptor. See gh-31255
This commit is contained in:
committed by
Andy Wilkinson
parent
5543fba57e
commit
230f2cda84
@@ -50,7 +50,7 @@ class RemoteDevtoolsSecurityConfiguration {
|
||||
@ConditionalOnMissingBean(org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.class)
|
||||
@SuppressWarnings("deprecation")
|
||||
SecurityFilterChain devtoolsSecurityFilterChain(HttpSecurity http) throws Exception {
|
||||
http.requestMatcher(new AntPathRequestMatcher(this.url)).authorizeRequests().anyRequest().anonymous().and()
|
||||
http.requestMatcher(new AntPathRequestMatcher(this.url)).authorizeHttpRequests().anyRequest().anonymous().and()
|
||||
.csrf().disable();
|
||||
return http.build();
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ class RemoteDevToolsAutoConfigurationTests {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.antMatcher("/foo/**").authorizeRequests().anyRequest().authenticated().and().httpBasic();
|
||||
http.antMatcher("/foo/**").authorizeHttpRequests().anyRequest().authenticated().and().httpBasic();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user