Class SecurityConfig
java.lang.Object
io.github.navjotsrakhra.eventmanager.config.SecurityConfig
The SecurityConfig class is responsible for configuring security settings and access control for the application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.crypto.password.PasswordEncoderConfigure the password encoder for encoding and validating passwords.org.springframework.security.web.SecurityFilterChainsecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) Configure security settings and access control for the application.
-
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.
-