Class BasicAuthentication<P,T>

java.lang.Object
org.apache.sshd.client.session.proxy.AbstractAuthenticationHandler<P,T>
org.apache.sshd.client.session.proxy.BasicAuthentication<P,T>
Type Parameters:
P - defining the parameter type for the authentication
T - defining the token type for the authentication
All Implemented Interfaces:
Closeable, AutoCloseable, AuthenticationHandler<P,T>

public abstract class BasicAuthentication<P,T> extends AbstractAuthenticationHandler<P,T>
An abstract implementation of a username-password authentication. It can be given an initial known username-password pair; if so, this will be tried first. Subsequent rounds will then try to obtain a user name and password via the global Authenticator.
  • Field Details

    • user

      protected String user
      The current user name.
    • password

      protected byte[] password
      The current password.
  • Constructor Details

    • BasicAuthentication

      protected BasicAuthentication(InetSocketAddress proxy, String initialUser, char[] initialPassword)
      Creates a new BasicAuthentication to authenticate with the given proxy.
      Parameters:
      proxy - InetSocketAddress of the proxy to connect to
      initialUser - initial user name to try; may be null
      initialPassword - initial password to try, may be null
  • Method Details