- @Override
- public void authenticate(Connection connection) throws IOException {
- final boolean isAuthenticated = connection.authenticateWithPassword(username, password);
-
- if (!isAuthenticated) {
- throw new IOException("Authentication failed.");
- }
- }
-