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


Java AccountStatusUserDetailsChecker类代码示例

本文整理汇总了Java中org.springframework.security.authentication.AccountStatusUserDetailsChecker的典型用法代码示例。如果您正苦于以下问题:Java AccountStatusUserDetailsChecker类的具体用法?Java AccountStatusUserDetailsChecker怎么用?Java AccountStatusUserDetailsChecker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AccountStatusUserDetailsChecker类属于org.springframework.security.authentication包,在下文中一共展示了AccountStatusUserDetailsChecker类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: UserServiceImpl

import org.springframework.security.authentication.AccountStatusUserDetailsChecker; //导入依赖的package包/类
@Autowired
public UserServiceImpl(UserRepository userRepository, EMailService eMailService,
                       PasswordEncoder encoder, BoardRepository boardRepository,
                       TaskRepository taskRepository, SecureRandom random) {

    Assert.notNull(userRepository, "User repository null");
    Assert.notNull(eMailService, "EMail service null");
    Assert.notNull(encoder, "password encoder null");
    Assert.notNull(boardRepository, "boardRepository null");
    Assert.notNull(taskRepository, "taskRepository null");
    Assert.notNull(random, "SecureRandom null");

    this.userRepository = userRepository;
    this.eMailService = eMailService;
    this.encoder = encoder;
    this.boardRepository = boardRepository;
    this.taskRepository = taskRepository;
    this.random = random;

    detailsChecker = new AccountStatusUserDetailsChecker();
}
 
开发者ID:Morbrolhc,项目名称:kanbanboard,代码行数:22,代码来源:UserServiceImpl.java

示例2: loadUserByUsername

import org.springframework.security.authentication.AccountStatusUserDetailsChecker; //导入依赖的package包/类
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
    final Optional<UserAccount> user = userRepository.findOneByUsername(username);
    final AccountStatusUserDetailsChecker detailsChecker = new AccountStatusUserDetailsChecker();
    user.ifPresent(detailsChecker::check);
    return user.orElseThrow(() -> new UsernameNotFoundException("user not found."));
}
 
开发者ID:HoodyMac,项目名称:SA-starter-kit,代码行数:8,代码来源:UserServiceImpl.java

示例3: loadUserByUsername

import org.springframework.security.authentication.AccountStatusUserDetailsChecker; //导入依赖的package包/类
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  final Optional<User> user = userRepository.findOneByUsername(username);
  final AccountStatusUserDetailsChecker detailsChecker = new AccountStatusUserDetailsChecker();
  user.ifPresent(detailsChecker::check);
  return user.orElseThrow(() -> new UsernameNotFoundException("user not found."));
}
 
开发者ID:hollannikas,项目名称:ssoidh,代码行数:8,代码来源:UserService.java


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