Package com.sshtools.client
Interface ClientAuthenticator
- All Superinterfaces:
RequestFuture
- All Known Implementing Classes:
ExternalKeyAuthenticator,IdentityFileAuthenticator,KeyboardInteractiveAuthenticator,KeyPairAuthenticator,NoneAuthenticator,PasswordAuthenticator,PrivateKeyFileAuthenticator,PublicKeyAuthenticator,SimpleClientAuthenticator
Base interface for all client authentication methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(TransportProtocolClient transport, String username) Start the authenticationvoidcancel()voidfailure()Called by the API to indicate authentication failure.String[]getName()The authentication mechanism name/.booleanbooleanbooleanprocessMessage(com.sshtools.common.util.ByteArrayReader msg) Process an authentication message.voidsuccess()Called by the API to indicate authentication success.voidMethods 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, SshException Start the authentication- Parameters:
transport-username-- Throws:
IOExceptionSshException
-
processMessage
boolean processMessage(com.sshtools.common.util.ByteArrayReader msg) throws IOException, SshException Process an authentication message.- Parameters:
msg-- Returns:
- Throws:
IOExceptionSshException
-
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
-