Package com.sshtools.client
Class SimpleClientAuthenticator
java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.client.SimpleClientAuthenticator
- All Implemented Interfaces:
ClientAuthenticator
,com.sshtools.common.ssh.RequestFuture
- Direct Known Subclasses:
KeyboardInteractiveAuthenticator
,MutualCallbackAuthenticator
,NoneAuthenticator
,PasswordAuthenticator
,PublicKeyAuthenticator
public abstract class SimpleClientAuthenticator
extends com.sshtools.common.ssh.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 TypeMethodDescriptionvoid
cancel()
void
failure()
Called by the API to indicate authentication failure.String[]
boolean
boolean
boolean
processMessage
(com.sshtools.common.util.ByteArrayReader msg) Process an authentication message.void
success()
Called by the API to indicate authentication success.void
Methods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, done, isDone, isSuccess, waitFor, waitForever
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sshtools.client.ClientAuthenticator
authenticate, getName
Methods 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, com.sshtools.common.ssh.SshException Description copied from interface:ClientAuthenticator
Process an authentication message.- Specified by:
processMessage
in interfaceClientAuthenticator
- Returns:
- Throws:
IOException
com.sshtools.common.ssh.SshException
-
isMoreAuthenticationRequired
public boolean isMoreAuthenticationRequired()- Specified by:
isMoreAuthenticationRequired
in interfaceClientAuthenticator
-
getAuthenticationMethods
- Specified by:
getAuthenticationMethods
in interfaceClientAuthenticator
-
success
public void success()Description copied from interface:ClientAuthenticator
Called by the API to indicate authentication success.- Specified by:
success
in interfaceClientAuthenticator
-
success
- Specified by:
success
in interfaceClientAuthenticator
-
failure
public void failure()Description copied from interface:ClientAuthenticator
Called by the API to indicate authentication failure.- Specified by:
failure
in interfaceClientAuthenticator
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceClientAuthenticator
-
cancel
public void cancel()- Specified by:
cancel
in interfaceClientAuthenticator
-