Class SecurityConfig

java.lang.Object
io.github.navjotsrakhra.eventmanager.config.SecurityConfig

@Configuration @EnableWebSecurity public class SecurityConfig extends Object
The SecurityConfig class is responsible for configuring security settings and access control for the application.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.crypto.password.PasswordEncoder
    Configure the password encoder for encoding and validating passwords.
    org.springframework.security.web.SecurityFilterChain
    securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    Configure security settings and access control for the application.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SecurityConfig

      public SecurityConfig()
  • Method Details

    • passwordEncoder

      @Bean public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()
      Configure the password encoder for encoding and validating passwords.
      Returns:
      A BCryptPasswordEncoder for password encoding.
    • securityFilterChain

      @Bean public org.springframework.security.web.SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) throws Exception
      Configure security settings and access control for the application.
      Parameters:
      httpSecurity - The HttpSecurity object to configure security settings.
      Returns:
      A SecurityFilterChain that defines the security configuration for the application.
      Throws:
      Exception - If there are configuration errors.