本文整理汇总了Java中org.springframework.security.authentication.dao.ReflectionSaltSource类的典型用法代码示例。如果您正苦于以下问题:Java ReflectionSaltSource类的具体用法?Java ReflectionSaltSource怎么用?Java ReflectionSaltSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReflectionSaltSource类属于org.springframework.security.authentication.dao包,在下文中一共展示了ReflectionSaltSource类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: authProvider
import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
@Bean
public DaoAuthenticationProvider authProvider() {
DaoAuthenticationProvider daoProvider = new DaoAuthenticationProvider();
daoProvider.setPasswordEncoder(md5PasswordEncoder());
daoProvider.setUserDetailsService(userDetailsService);
ReflectionSaltSource saltHash = new ReflectionSaltSource();
saltHash.setUserPropertyToUse("username");
daoProvider.setSaltSource(saltHash);
return daoProvider;
}
示例2: saltSource
import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
@Bean
public ReflectionSaltSource saltSource() {
final ReflectionSaltSource reflectionSaltSource = new ReflectionSaltSource();
reflectionSaltSource.setUserPropertyToUse("username");
return reflectionSaltSource;
}
示例3: setUp
import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
/**
*
*/
@Before
public final void setUp() {
userService = new UserServiceImpl();
userService.setPasswordEncoder(new Md5PasswordEncoder());
ReflectionSaltSource saltSource = new ReflectionSaltSource();
saltSource.setUserPropertyToUse("getUsername");
userService.setSaltSource(saltSource);
userDao = EasyMock.createMock(UserDao.class);
userService.setUserDao(userDao);
}
示例4: saltSource
import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
@Bean
public ReflectionSaltSource saltSource() {
final ReflectionSaltSource reflectionSaltSource = new ReflectionSaltSource();
reflectionSaltSource.setUserPropertyToUse("username");
return reflectionSaltSource;
}
示例5: getUserSaltForEncode
import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
private Object getUserSaltForEncode(MarketsSimUser user) {
ReflectionSaltSource saltSource = new ReflectionSaltSource();
saltSource.setUserPropertyToUse("username");
Object salt = saltSource.getSalt(user);
return salt;
}
示例6: UserServiceImpl
import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
public UserServiceImpl() {
saltSource = new ReflectionSaltSource();
((ReflectionSaltSource) saltSource).setUserPropertyToUse("getUsername");
passwordEncoder = new Md5PasswordEncoder();
userCache = new NullUserCache();
}