public class CoreSecurityConfiguration
extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
@SpringBootApplication public class SampleApplication { // ... @EnableWebSecurity static class SecurityConfiguration extends CoreSecurityConfiguration { @Override public UserRepository userRepository() { InMemoryCoreUserRepository repository = new InMemoryCoreUserRepository(); repository.addUser(new CoreUser("admin", "{noop}admin", "Administrator")); return repository; } } }
Constructor and Description |
---|
CoreSecurityConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.authentication.AuthenticationManager |
authenticationManagerBean() |
protected void |
configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) |
protected void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
PostAuthenticationChecks |
postAuthenticationChecks() |
PreAuthenticationChecks |
preAuthenticationChecks() |
UserRepository |
userRepository() |
authenticationManager, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws java.lang.Exception
configure
in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
java.lang.Exception
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception
configure
in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
java.lang.Exception
@Bean(name="core_authenticationManager") public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean() throws java.lang.Exception
authenticationManagerBean
in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
java.lang.Exception
@Bean(name="core_UserRepository") public UserRepository userRepository()
@Bean(name="core_PreAuthenticationChecks") public PreAuthenticationChecks preAuthenticationChecks()
@Bean(name="core_PostAuthenticationChecks") public PostAuthenticationChecks postAuthenticationChecks()