Enable web security in the spring SecurityConfig

This commit is contained in:
2026-06-01 19:25:11 -06:00
parent f6bae75b07
commit c864c71f3f

View File

@@ -10,6 +10,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration; import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; 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.configurers.AbstractHttpConfigurer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@@ -23,6 +24,7 @@ import jakarta.servlet.http.HttpServletResponse;
* Provides the password encoder bean used to hash and verify user passwords. * Provides the password encoder bean used to hash and verify user passwords.
*/ */
@Configuration @Configuration
@EnableWebSecurity
public class SecurityConfig { public class SecurityConfig {
private final JwtAuthFilter jwtAuthFilter; private final JwtAuthFilter jwtAuthFilter;