Skip to content

Instantly share code, notes, and snippets.

@luissilvazup
Last active June 17, 2020 21:30
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/ab1653da1097076c7f8026240c5729a8 to your computer and use it in GitHub Desktop.
Save luissilvazup/ab1653da1097076c7f8026240c5729a8 to your computer and use it in GitHub Desktop.
DIP Problem
public class D_DependencyInversionProblem {
@AllArgsConstructor
private static class AuthenticateLogin {
public boolean login(User user){
AuthenticationLinkedin authentication = new AuthenticationLinkedin();
return authentication.login(user);
}
}
private static class AuthenticationLinkedin {
public boolean login(User user) {
//autêntica o login com o Oauth Linkedin.
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment