Class SecurityConfig

java.lang.Object
com.dada.banking_project.security.SecurityConfig

@Configuration @EnableWebSecurity public class SecurityConfig extends Object
This is the main configuration class for security in the application. It enables web security, sets up the password encoder, and sets up the security filter chain.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.authentication.AuthenticationManager
    authenticationManager(org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration authenticationConfiguration)
    Bean definition for AuthenticationManager
    org.springframework.security.crypto.password.PasswordEncoder
    Bean definition for PasswordEncoder
    protected org.springframework.security.web.SecurityFilterChain
    filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
    Bean definition for SecurityFilterChain

    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

    • encoder

      @Bean public org.springframework.security.crypto.password.PasswordEncoder encoder()
      Bean definition for PasswordEncoder
      Returns:
      an instance of the DelegatingPasswordEncoder
    • authenticationManager

      @Bean public org.springframework.security.authentication.AuthenticationManager authenticationManager(org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration authenticationConfiguration) throws Exception
      Bean definition for AuthenticationManager
      Parameters:
      authenticationConfiguration - the instance of AuthenticationConfiguration
      Returns:
      an instance of the AuthenticationManager
      Throws:
      Exception - if there is an issue getting the instance of the AuthenticationManager
    • filterChain

      @Bean protected org.springframework.security.web.SecurityFilterChain filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Bean definition for SecurityFilterChain
      Parameters:
      http - the instance of HttpSecurity
      Returns:
      an instance of the SecurityFilterChain
      Throws:
      Exception - if there is an issue building the SecurityFilterChain