Interface ClientAuthenticationManager

All Superinterfaces:
org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder, org.apache.sshd.common.auth.UserAuthFactoriesManager<ClientSession, UserAuth, UserAuthFactory>
All Known Subinterfaces:
ClientFactoryManager, ClientSession
All Known Implementing Classes:
AbstractClientSession, ClientSessionImpl, SshClient

public interface ClientAuthenticationManager extends org.apache.sshd.common.auth.UserAuthFactoriesManager<ClientSession, UserAuth, UserAuthFactory>, org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder
Holds information required for the client to perform authentication with the server
Author:
Apache MINA SSHD Project
  • Method Details

    • getRegisteredIdentities

      org.apache.sshd.client.auth.AuthenticationIdentitiesProvider getRegisteredIdentities()
      Returns:
      The AuthenticationIdentitiesProvider to be used for attempting password or public key authentication
    • getPasswordIdentityProvider

      org.apache.sshd.client.auth.password.PasswordIdentityProvider getPasswordIdentityProvider()
      Retrieve PasswordIdentityProvider used to provide password candidates
      Returns:
      The PasswordIdentityProvider instance - ignored if null (i.e., no passwords available).
      See Also:
    • setPasswordIdentityProvider

      void setPasswordIdentityProvider(org.apache.sshd.client.auth.password.PasswordIdentityProvider provider)
    • addPasswordIdentity

      void addPasswordIdentity(String password)
      Parameters:
      password - Password to be added - may not be null/empty. Note: this password is in addition to whatever passwords are available via the PasswordIdentityProvider (if any)
    • removePasswordIdentity

      String removePasswordIdentity(String password)
      Parameters:
      password - The password to remove - ignored if null/empty
      Returns:
      The removed password - same one that was added via addPasswordIdentity(String) - or null if no match found
    • addPublicKeyIdentity

      void addPublicKeyIdentity(KeyPair key)
      Parameters:
      key - The KeyPair to add - may not be null Note: this key is in addition to whatever keys are available via the KeyIdentityProvider (if any)
    • removePublicKeyIdentity

      KeyPair removePublicKeyIdentity(KeyPair kp)
      Parameters:
      kp - The KeyPair to remove - ignored if null
      Returns:
      The removed KeyPair - same one that was added via addPublicKeyIdentity(KeyPair) - or null if no match found
    • getServerKeyVerifier

      ServerKeyVerifier getServerKeyVerifier()
      Retrieve the server key verifier to be used to check the key when connecting to an SSH server.
      Returns:
      the ServerKeyVerifier to use - never null
    • setServerKeyVerifier

      void setServerKeyVerifier(ServerKeyVerifier serverKeyVerifier)
    • getUserInteraction

      UserInteraction getUserInteraction()
      Returns:
      A UserInteraction object to communicate with the user (may be null to indicate that no such communication is allowed)
    • setUserInteraction

      void setUserInteraction(UserInteraction userInteraction)
    • getPasswordAuthenticationReporter

      PasswordAuthenticationReporter getPasswordAuthenticationReporter()
    • setPasswordAuthenticationReporter

      void setPasswordAuthenticationReporter(PasswordAuthenticationReporter reporter)
    • getPublicKeyAuthenticationReporter

      PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter()
    • setPublicKeyAuthenticationReporter

      void setPublicKeyAuthenticationReporter(PublicKeyAuthenticationReporter reporter)
    • getHostBasedAuthenticationReporter

      HostBasedAuthenticationReporter getHostBasedAuthenticationReporter()
    • setHostBasedAuthenticationReporter

      void setHostBasedAuthenticationReporter(HostBasedAuthenticationReporter reporter)
    • setUserAuthFactoriesNames

      default void setUserAuthFactoriesNames(Collection<String> names)
      Specified by:
      setUserAuthFactoriesNames in interface org.apache.sshd.common.auth.UserAuthFactoriesManager<ClientSession, UserAuth, UserAuthFactory>