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 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

      void success(boolean moreAuthenticationsRequired, String[] authenticationMethods)