Class SecurityConfig

java.lang.Object
com.bayudwiyansatria.spring.config.SecurityConfig

@Configuration @EnableWebSecurity public class SecurityConfig extends Object
SecurityConfig

Security configuration class for the application. Configures HTTP security settings, including CSRF protection, request authorization, HTTP basic authentication, and session management.

Since:
0.0.1
Version:
0.0.1
Author:
Bayu Dwiyan Satria
  • Constructor Details

    • SecurityConfig

      public SecurityConfig()
  • Method Details

    • filterChain

      @Bean public org.springframework.security.web.SecurityFilterChain filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Configures the security filter chain. Disables CSRF protection, allows public access to all endpoints, enables HTTP basic authentication, and sets session management to stateless.
      Parameters:
      http - the HttpSecurity to modify
      Returns:
      the configured SecurityFilterChain
      Throws:
      Exception - if an error occurs while configuring the security filter chain
      Since:
      0.0.1