Remove netconf from commons/opendaylight pom
[controller.git] / opendaylight / netconf / netconf-netty-util / src / main / java / org / opendaylight / controller / netconf / nettyutil / handler / ssh / authentication / LoginPassword.java
index 553e5359ffed1cd8b5728734bb5546e3abb0f72e..ab94e59a93dcf4e70494f7bf65ba66a28b5915c0 100644 (file)
@@ -9,15 +9,12 @@
 package org.opendaylight.controller.netconf.nettyutil.handler.ssh.authentication;
 
 import java.io.IOException;
-
 import org.apache.sshd.ClientSession;
 import org.apache.sshd.client.future.AuthFuture;
 
-import ch.ethz.ssh2.Connection;
-
 /**
  * Class Providing username/password authentication option to
- * {@link org.opendaylight.controller.netconf.nettyutil.handler.ssh.client.SshHandler}
+ * {@link org.opendaylight.controller.netconf.nettyutil.handler.ssh.client.AsyncSshHandler}
  */
 public class LoginPassword extends AuthenticationHandler {
     private final String username;
@@ -28,15 +25,6 @@ public class LoginPassword extends AuthenticationHandler {
         this.password = password;
     }
 
-    @Override
-    public void authenticate(Connection connection) throws IOException {
-        final boolean isAuthenticated = connection.authenticateWithPassword(username, password);
-
-        if (!isAuthenticated) {
-            throw new IOException("Authentication failed.");
-        }
-    }
-
     @Override
     public String getUsername() {
         return username;