コード例 #1
0
  @Override
  public boolean isUserValid(String username, String password) {
    UserVO userVO = userApplication.findByUserAccount(username);

    if (userVO == null) {
      return false;
    }

    if (passwordEncoder.encode(password).equals(userVO.getUserPassword())) {
      return true;
    }

    return false;
  }
コード例 #2
0
 public UserVO modifyPassword(Long id, UserVO user) {
   UserVO userVO = userApplication.getUser(id);
   userVO.setUserPassword(passwordEncoder.encode(user.getUserPassword()));
   userApplication.updatePassword(userVO, passwordEncoder.encode(user.getOldPassword()));
   return userApplication.getUser(id);
 }
コード例 #3
0
 public UserVO createUser(UserVO user) {
   user.setValid(true);
   user.setUserPassword(passwordEncoder.encode(user.getUserPassword()));
   UserVO result = userApplication.saveUser(user);
   return result;
 }