Package io.jmix.core.security
Class CoreSecurityConfiguration
java.lang.Object
io.jmix.core.security.CoreSecurityConfiguration
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.DefaultAuthenticationEventPublisher
authenticationEventPublisher
(org.springframework.context.ApplicationEventPublisher publisher) org.springframework.security.authentication.AuthenticationManager
authenticationManager
(UserRepository userRepository, org.springframework.security.authentication.AuthenticationEventPublisher authenticationEventPublisher, PreAuthenticationChecks preAuthenticationChecks, PostAuthenticationChecks postAuthenticationChecks) org.springframework.security.web.SecurityFilterChain
securityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, UserRepository userRepository, CoreProperties coreProperties)
-
Constructor Details
-
CoreSecurityConfiguration
public CoreSecurityConfiguration()
-
-
Method Details
-
securityFilterChain
@Bean("core_SecurityFilterChain") @Order(400) public org.springframework.security.web.SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http, UserRepository userRepository, CoreProperties coreProperties) throws Exception - Throws:
Exception
-
authenticationManager
@Bean(name="core_authenticationManager") public org.springframework.security.authentication.AuthenticationManager authenticationManager(UserRepository userRepository, org.springframework.security.authentication.AuthenticationEventPublisher authenticationEventPublisher, @Qualifier("core_PreAuthenticationChecks") PreAuthenticationChecks preAuthenticationChecks, @Qualifier("core_PostAuthenticationChecks") PostAuthenticationChecks postAuthenticationChecks) throws Exception - Throws:
Exception
-
userRepository
-
preAuthenticationChecks
-
postAuthenticationChecks
@Bean(name="core_PostAuthenticationChecks") public PostAuthenticationChecks postAuthenticationChecks() -
authenticationEventPublisher
@Bean("core_AuthenticationEventPublisher") public org.springframework.security.authentication.DefaultAuthenticationEventPublisher authenticationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
-