Java Code Examples for org.springframework.security.authentication.DefaultAuthenticationEventPublisher

The following examples show how to use org.springframework.security.authentication.DefaultAuthenticationEventPublisher. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: cola   Source File: BaseSecurityConfiguration.java    License: MIT License 5 votes vote down vote up
@Override
protected void configure(HttpSecurity http) throws Exception {
	if (configurers != null) {
		for (ChannelSecurityConfigurer configurer : configurers) {
			configurer.configure(http);
		}
	}
	http.userDetailsService(userDetailsService).authorizeRequests().antMatchers("/**").authenticated();
	http.getSharedObject(AuthenticationManagerBuilder.class).authenticationEventPublisher(new DefaultAuthenticationEventPublisher(applicationEventPublisher));
}
 
Example 2
Source Project: cola   Source File: BaseSecurityConfiguration.java    License: MIT License 4 votes vote down vote up
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
	auth.authenticationEventPublisher(new DefaultAuthenticationEventPublisher(applicationEventPublisher))
			.userDetailsService(userDetailsService)
			.passwordEncoder(passwordEncoder());
}
 
Example 3
Source Project: inception   Source File: InceptionSecurity.java    License: Apache License 2.0 4 votes vote down vote up
@Autowired
protected void configureGlobal(AuthenticationManagerBuilder auth) throws Exception
{
    auth.authenticationProvider(authenticationProvider);
    auth.authenticationEventPublisher(new DefaultAuthenticationEventPublisher());
}
 
Example 4
Source Project: zhcet-web   Source File: SecurityBeans.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
AuthenticationEventPublisher authenticationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
    return new DefaultAuthenticationEventPublisher(applicationEventPublisher);
}
 
Example 5
@Bean
public DefaultAuthenticationEventPublisher authenticationEventPublisher()
{
    return new DefaultAuthenticationEventPublisher();
}