JAVA-15688 Update fauna module under persistence-modules to remove usage of deprecated WebSecurityConfigurerAdapter (#13054)
* JAVA-15688 Update fauna module under persistence-modules to remove usage of deprecated WebSecurityConfigurerAdapter * JAVA-15688 Fix build issue
This commit is contained in:
parent
32e34e537b
commit
b0de3c6279
|
@ -8,27 +8,30 @@ import org.springframework.context.annotation.Configuration;
|
|||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
public class WebSecurityConfiguration {
|
||||
|
||||
@Autowired
|
||||
private FaunaClient faunaClient;
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.csrf().disable();
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
http.csrf()
|
||||
.disable();
|
||||
http.authorizeRequests()
|
||||
.antMatchers("/**").permitAll()
|
||||
.and().httpBasic();
|
||||
.antMatchers("/**")
|
||||
.permitAll()
|
||||
.and()
|
||||
.httpBasic();
|
||||
return http.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
public UserDetailsService userDetailsService() {
|
||||
return new FaunaUserDetailsService(faunaClient);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue