Package com.sshtools.client
Class SimpleClientAuthenticator
java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.client.SimpleClientAuthenticator
- All Implemented Interfaces:
ClientAuthenticator,RequestFuture
- Direct Known Subclasses:
KeyboardInteractiveAuthenticator,NoneAuthenticator,PasswordAuthenticator,PublicKeyAuthenticator
public abstract class SimpleClientAuthenticator
extends AbstractRequestFuture
implements ClientAuthenticator
A simple base class for implementing non-interactive authentication methods. Use when the
authentication method consists of a single message sent to the server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidfailure()Called by the API to indicate authentication failure.String[]booleanbooleanbooleanprocessMessage(com.sshtools.common.util.ByteArrayReader msg) Process an authentication message.voidsuccess()Called by the API to indicate authentication success.voidMethods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, done, isDone, isSuccess, waitFor, waitForeverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sshtools.client.ClientAuthenticator
authenticate, getNameMethods inherited from interface com.sshtools.common.ssh.RequestFuture
addFutureListener, isDone, isDoneAndSuccess, isSuccess, waitFor, waitForever
-
Constructor Details
-
SimpleClientAuthenticator
public SimpleClientAuthenticator()
-
-
Method Details
-
processMessage
public boolean processMessage(com.sshtools.common.util.ByteArrayReader msg) throws IOException, SshException Description copied from interface:ClientAuthenticatorProcess an authentication message.- Specified by:
processMessagein interfaceClientAuthenticator- Returns:
- Throws:
IOExceptionSshException
-
isMoreAuthenticationRequired
public boolean isMoreAuthenticationRequired()- Specified by:
isMoreAuthenticationRequiredin interfaceClientAuthenticator
-
getAuthenticationMethods
- Specified by:
getAuthenticationMethodsin interfaceClientAuthenticator
-
success
public void success()Description copied from interface:ClientAuthenticatorCalled by the API to indicate authentication success.- Specified by:
successin interfaceClientAuthenticator
-
success
- Specified by:
successin interfaceClientAuthenticator
-
failure
public void failure()Description copied from interface:ClientAuthenticatorCalled by the API to indicate authentication failure.- Specified by:
failurein interfaceClientAuthenticator
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceClientAuthenticator
-
cancel
public void cancel()- Specified by:
cancelin interfaceClientAuthenticator
-