本文整理汇总了Java中org.springframework.security.authentication.dao.ReflectionSaltSource.setUserPropertyToUse方法的典型用法代码示例。如果您正苦于以下问题:Java ReflectionSaltSource.setUserPropertyToUse方法的具体用法?Java ReflectionSaltSource.setUserPropertyToUse怎么用?Java ReflectionSaltSource.setUserPropertyToUse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.security.authentication.dao.ReflectionSaltSource
的用法示例。
在下文中一共展示了ReflectionSaltSource.setUserPropertyToUse方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}