Class ComponentBasedSecurityConfiguration
java.lang.Object
info.ejava.examples.svc.authn.users.security.ComponentBasedSecurityConfiguration
@Configuration(proxyBeanMethods=false)
public class ComponentBasedSecurityConfiguration
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.web.SecurityFilterChain
apiSecurityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer
org.springframework.security.authentication.AuthenticationManager
authnManager
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, List<org.springframework.security.core.userdetails.UserDetailsService> userDetailsServices) private org.springframework.web.cors.CorsConfigurationSource
org.springframework.web.cors.CorsConfigurationSource
org.springframework.security.web.SecurityFilterChain
defaultSecurityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) org.springframework.security.web.SecurityFilterChain
h2SecurityFilters
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, org.springframework.security.authentication.AuthenticationManager authMgr) Adding h2-console to application and protecting behind a FORM login fed off the application's authentication manager.org.springframework.security.core.userdetails.UserDetailsService
jdbcUserDetailsService
(DataSource userDataSource) org.springframework.security.crypto.password.PasswordEncoder
org.springframework.security.core.userdetails.UserDetailsService
sharedUserDetailsService
(org.springframework.security.crypto.password.PasswordEncoder encoder)
-
Constructor Details
-
ComponentBasedSecurityConfiguration
public ComponentBasedSecurityConfiguration()
-
-
Method Details
-
apiStaticResources
@Bean public org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer apiStaticResources() -
apiSecurityFilterChain
@Bean @Order(0) public org.springframework.security.web.SecurityFilterChain apiSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Throws:
Exception
-
authnManager
@Bean public org.springframework.security.authentication.AuthenticationManager authnManager(org.springframework.security.config.annotation.web.builders.HttpSecurity http, List<org.springframework.security.core.userdetails.UserDetailsService> userDetailsServices) throws Exception - Throws:
Exception
-
defaultSecurityFilterChain
@Bean @Order(1000) public org.springframework.security.web.SecurityFilterChain defaultSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Throws:
Exception
-
corsLimitedConfigurationSource
private org.springframework.web.cors.CorsConfigurationSource corsLimitedConfigurationSource() -
corsPermitAllConfigurationSource
@Bean public org.springframework.web.cors.CorsConfigurationSource corsPermitAllConfigurationSource() -
passwordEncoder
@Bean public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder() -
jdbcUserDetailsService
@Bean public org.springframework.security.core.userdetails.UserDetailsService jdbcUserDetailsService(DataSource userDataSource) -
h2SecurityFilters
@Order(500) @Bean public org.springframework.security.web.SecurityFilterChain h2SecurityFilters(org.springframework.security.config.annotation.web.builders.HttpSecurity http, org.springframework.security.authentication.AuthenticationManager authMgr) throws Exception Adding h2-console to application and protecting behind a FORM login fed off the application's authentication manager.- Parameters:
http
-authMgr
-- Throws:
Exception
-