Package com.sshtools.client
Interface ClientAuthenticator
- All Superinterfaces:
com.sshtools.common.ssh.RequestFuture
- All Known Implementing Classes:
ExternalKeyAuthenticator
,IdentityFileAuthenticator
,KeyboardInteractiveAuthenticator
,KeyPairAuthenticator
,MutualCallbackAuthenticator
,NoneAuthenticator
,PasswordAuthenticator
,PrivateKeyFileAuthenticator
,PublicKeyAuthenticator
,SimpleClientAuthenticator
public interface ClientAuthenticator
extends com.sshtools.common.ssh.RequestFuture
Base interface for all client authentication methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
authenticate
(TransportProtocolClient transport, String username) Start the authenticationvoid
cancel()
void
failure()
Called by the API to indicate authentication failure.String[]
getName()
The authentication mechanism name/.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 interface com.sshtools.common.ssh.RequestFuture
addFutureListener, isDone, isDoneAndSuccess, isSuccess, waitFor, waitForever
-
Method Details
-
getName
String getName()The authentication mechanism name/.- Returns:
-
authenticate
void authenticate(TransportProtocolClient transport, String username) throws IOException, com.sshtools.common.ssh.SshException Start the authentication- Parameters:
transport
-username
-- Throws:
IOException
com.sshtools.common.ssh.SshException
-
processMessage
boolean processMessage(com.sshtools.common.util.ByteArrayReader msg) throws IOException, com.sshtools.common.ssh.SshException Process an authentication message.- Parameters:
msg
-- Returns:
- Throws:
IOException
com.sshtools.common.ssh.SshException
-
success
void success()Called by the API to indicate authentication success. -
failure
void failure()Called by the API to indicate authentication failure. -
isMoreAuthenticationRequired
boolean isMoreAuthenticationRequired() -
isCancelled
boolean isCancelled() -
cancel
void cancel() -
getAuthenticationMethods
String[] getAuthenticationMethods() -
success
-