Skip to content

Instantly share code, notes, and snippets.

@luissilvazup
Created June 17, 2020 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luissilvazup/c8b56b9cd1611f44d1b59044090dc6b0 to your computer and use it in GitHub Desktop.
Save luissilvazup/c8b56b9cd1611f44d1b59044090dc6b0 to your computer and use it in GitHub Desktop.
OCP Problem
public class O_OpenClosedProblem {
private static class AuthenticateLogin{
public boolean login(User user, String provider){
ConnectionDAO connectionDAO = new ConnectionDAO("root", "");
Connection connection = connectionDAO.createConnection();
if(provider.equalsIgnoreCase("Linkedin")){
//autêntica o login com o Oauth Linkedin
}
else{
//autêntica o login com informações do banco de dados
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment