Package com.bytedesk.core.config
Class WebSecurityConfig
java.lang.Object
com.bytedesk.core.config.WebSecurityConfig
@Configuration
@EnableWebSecurity
@EnableMethodSecurity
public class WebSecurityConfig
extends Object
https://github.com/pengjinning/spring-boot-3-jwt-security
https://github.com/pengjinning/spring-boot-spring-security-jwt-authentication
https://dev.to/jean_claude_van_debug/spring-security-mutliple-authentication-providers-new-spring-boot-3-e1j
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
private AuthEntryPoint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.AuthenticationProvider
https://wankhedeshubham.medium.com/spring-boot-security-with-userdetailsservice-and-custom-authentication-provider-3df3a188993forg.springframework.security.web.SecurityFilterChain
securityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) org.springframework.security.core.userdetails.UserDetailsService
-
Field Details
-
passwordEncoder
@Autowired private org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder passwordEncoder -
unauthorizedHandler
-
-
Constructor Details
-
WebSecurityConfig
public WebSecurityConfig()
-
-
Method Details
-
securityFilterChain
@Bean public org.springframework.security.web.SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Throws:
Exception
-
userDetailsService
@Bean public org.springframework.security.core.userdetails.UserDetailsService userDetailsService() -
authTokenFilter
-
authenticationProvider
@Bean public org.springframework.security.authentication.AuthenticationProvider authenticationProvider()https://wankhedeshubham.medium.com/spring-boot-security-with-userdetailsservice-and-custom-authentication-provider-3df3a188993f- Returns:
-