X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-netty-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fnettyutil%2Fhandler%2Fssh%2Fauthentication%2FLoginPassword.java;h=ab94e59a93dcf4e70494f7bf65ba66a28b5915c0;hb=2f097c374a16b818f50f945cafc2461b9c5b8321;hp=553e5359ffed1cd8b5728734bb5546e3abb0f72e;hpb=953ef0690fc6803449c43e3e886fb30f2ac5d7b3;p=controller.git diff --git a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/authentication/LoginPassword.java b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/authentication/LoginPassword.java index 553e5359ff..ab94e59a93 100644 --- a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/authentication/LoginPassword.java +++ b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/authentication/LoginPassword.java @@ -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;