Created
August 4, 2018 14:14
-
-
Save samfcmc/5a61c35aeb07c2163fedfa61b248dfd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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