Skip to content

Instantly share code, notes, and snippets.

@Adrianvdh
Created December 19, 2017 04:48
Show Gist options
  • Save Adrianvdh/89d433c671f07fa5506a5868d6a02b0d to your computer and use it in GitHub Desktop.
Save Adrianvdh/89d433c671f07fa5506a5868d6a02b0d to your computer and use it in GitHub Desktop.
public class UserService {
private UserRepository userRepository;
public UserService(UserRepository userRepository) {
this.userRepository = userRepository;
}
public User authenticate(String username, String password) {
User foundUser = userRepository.findByUsername(username)
return foundUser;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment