
net.osgiliath.feature.itest.security.conf.SecurityAuthenticationProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of net.osgiliath.feature.itest.security Show documentation
Show all versions of net.osgiliath.feature.itest.security Show documentation
Security integration tests for Osgiliath
The newest version!
package net.osgiliath.feature.itest.security.conf;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.authentication.dao.SaltSource;
import org.springframework.security.authentication.encoding.PasswordEncoder;
import org.springframework.security.core.userdetails.UserDetailsService;
@ApplicationScoped
public class SecurityAuthenticationProvider {
@Inject
private transient SaltSource saltSource;
@Inject
private transient PasswordEncoder passwordEncoder;
@Inject
private transient UserDetailsService userDetailsService;
@Produces
public AuthenticationProvider createAuthenticationProvider() {
DaoAuthenticationProvider provider = new DaoAuthenticationProvider();
provider.setUserDetailsService(userDetailsService);
provider.setPasswordEncoder(passwordEncoder);
provider.setSaltSource(saltSource);
return provider;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy