Package io.jmix.core.security
Class CoreSecurityConfiguration
java.lang.Object
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
io.jmix.core.security.CoreSecurityConfiguration
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,
,org.springframework.security.config.annotation.web.builders.WebSecurity> org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
@Order(150)
public class CoreSecurityConfiguration
extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
This security configuration can be used in test or simple projects, for example:
@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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.AuthenticationManager
protected void
configure
(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) protected void
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
Constructor Details
-
CoreSecurityConfiguration
public CoreSecurityConfiguration()
-
-
Method Details
-
configure
protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws Exception - Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Throws:
Exception
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Throws:
Exception
-
authenticationManagerBean
@Bean(name="core_authenticationManager") public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean() throws Exception- Overrides:
authenticationManagerBean
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Throws:
Exception
-
userRepository
-
preAuthenticationChecks
-
postAuthenticationChecks
@Bean(name="core_PostAuthenticationChecks") public PostAuthenticationChecks postAuthenticationChecks()
-