Package com.impromptu.users

Examples of com.impromptu.users.User


        return eventDetails;
    }
 
  private void populateUsers(Set<User> users, Iterable<String> userIds) {
      for (String userId : userIds) {
            User user = userRepository.findOne(userId);
            if (user != null) {
                users.add(user);
            }
        }
  }
View Full Code Here


        if(result.hasErrors()) {
            registerUserForm.setPassword("");
            registerUserForm.setConfirmPassword("");
            return "registration/form";
        }
        userRepository.save(new User(registerUserForm));
       
        // TODO: log in the newly created user
       
        return "redirect:/";
    }
View Full Code Here

  public String getConfirmPassword() {
    return confirmPassword;
  }
 
  public User getUserAccount() {
      return new User(this);
  }
View Full Code Here

  @Override
  public Authentication authenticate(Authentication authentication) throws AuthenticationException {
    UsernamePasswordAuthenticationToken token = (UsernamePasswordAuthenticationToken) authentication;
    String username = token.getName();
    String password = (String)token.getCredentials();
    User account = accountRepository.findByEmailAndPassword(username, password);
    if (account == null) {
      logger.info("Invalid login. username={} password={}", username, password);
      throw new BadCredentialsException("Bad credentials");
    }
    return authenticatedToken(account, authentication);
View Full Code Here

TOP

Related Classes of com.impromptu.users.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.