Class SecurityConfig

java.lang.Object
callofproject.dev.authentication.config.SecurityConfig

@Configuration @EnableMethodSecurity @EnableWebSecurity public class SecurityConfig extends Object
This class is a Spring Configuration class that provides configuration for security.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SecurityConfig(org.springframework.security.authentication.AuthenticationProvider authenticationProvider)
    Constructs a new SecurityConfig.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.web.SecurityFilterChain
    securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
    Configure security

    Methods inherited from class java.lang.Object

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

    • SecurityConfig

      public SecurityConfig(org.springframework.security.authentication.AuthenticationProvider authenticationProvider)
      Constructs a new SecurityConfig.
      Parameters:
      authenticationProvider - The AuthenticationProvider object to be injected.
  • Method Details

    • securityFilterChain

      @Bean public org.springframework.security.web.SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Configure security
      Parameters:
      http - represent the http
      Returns:
      SecurityFilterChain
      Throws:
      Exception - if something goes wrong