removed a dependency from spring security in the module web-showcase

This commit is contained in:
Fabio Formosa
2022-10-22 15:31:36 +02:00
parent 65558c7ee8
commit ed266dea15

View File

@@ -1,27 +0,0 @@
package it.fabioformosa;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
public class SecurityConfig {
@Order(SecurityProperties.BASIC_AUTH_ORDER)
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
.csrf().disable()
.authorizeRequests()
.anyRequest()
.authenticated().and()
.httpBasic();
return http.build();
}
}