当前位置: 首页>>代码示例>>Java>>正文


Java ReflectionSaltSource类代码示例

本文整理汇总了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;
}
 
开发者ID:PacktPublishing,项目名称:Spring-5.0-Cookbook,代码行数:11,代码来源:AppSecurityModelG.java

示例2: saltSource

import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
@Bean
public ReflectionSaltSource saltSource() {

    final ReflectionSaltSource reflectionSaltSource = new ReflectionSaltSource();
    reflectionSaltSource.setUserPropertyToUse("username");

    return reflectionSaltSource;
}
 
开发者ID:tvajjala,项目名称:interview-preparation,代码行数:9,代码来源:WebSecurityConfig.java

示例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);
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:14,代码来源:UserServiceImplTest.java

示例4: saltSource

import org.springframework.security.authentication.dao.ReflectionSaltSource; //导入依赖的package包/类
@Bean
public ReflectionSaltSource saltSource() {
    final ReflectionSaltSource reflectionSaltSource = new ReflectionSaltSource();
    reflectionSaltSource.setUserPropertyToUse("username");
    return reflectionSaltSource;
}
 
开发者ID:tvajjala,项目名称:interview-preparation,代码行数:7,代码来源:WebSecurityConfig.java

示例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;
}
 
开发者ID:GMCgames,项目名称:MarketsSimServer,代码行数:7,代码来源:MarketsSimAuthProvider.java

示例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();
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:7,代码来源:UserServiceImpl.java


注:本文中的org.springframework.security.authentication.dao.ReflectionSaltSource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。