Skip to content

Instantly share code, notes, and snippets.

@samfcmc
Created August 4, 2018 14:14
Show Gist options
  • Save samfcmc/5a61c35aeb07c2163fedfa61b248dfd9 to your computer and use it in GitHub Desktop.
Save samfcmc/5a61c35aeb07c2163fedfa61b248dfd9 to your computer and use it in GitHub Desktop.
public class LoginHandler {
public boolean login(String username, String password) {
if(username != null && password != null) {
String passwordFromDB = getPasswordFromDB(username);
return passwordFromDB != null && password.equals(passwordFromDB);
}
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment