Class BasicAuthentication<ParameterType,TokenType>

java.lang.Object
org.eclipse.jgit.internal.transport.sshd.auth.AbstractAuthenticationHandler<ParameterType,TokenType>
org.eclipse.jgit.internal.transport.sshd.auth.BasicAuthentication<ParameterType,TokenType>
Type Parameters:
ParameterType - defining the parameter type for the authentication
TokenType - defining the token type for the authentication
All Implemented Interfaces:
Closeable, AutoCloseable, AuthenticationHandler<ParameterType,TokenType>

public abstract class BasicAuthentication<ParameterType,TokenType> extends AbstractAuthenticationHandler<ParameterType,TokenType>
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

      public 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