
net.osgiliath.feature.itest.security.conf.BaseEncodingProvider 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 org.springframework.security.authentication.dao.ReflectionSaltSource;
import org.springframework.security.authentication.dao.SaltSource;
import org.springframework.security.authentication.encoding.PasswordEncoder;
import org.springframework.security.authentication.encoding.ShaPasswordEncoder;
@ApplicationScoped
public class BaseEncodingProvider {
@Produces
public SaltSource createSaltSource() {
ReflectionSaltSource ret = new ReflectionSaltSource();
ret.setUserPropertyToUse("pseudo");
return ret;
}
@Produces
public PasswordEncoder createPasswordEncoder() {
ShaPasswordEncoder pwdEncoder = new ShaPasswordEncoder(512);
pwdEncoder.setEncodeHashAsBase64(true);
return pwdEncoder;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy