/** * Creates a new authentication with the specified properties * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. * @param privateKeyFile The path to the private key file, may be {@code null}. * @param passphrase The passphrase for the private key file, may be {@code null}. */ public Authentication( String username, String password, String privateKeyFile, String passphrase ) { this( username, privateKeyFile, toChars( password ), toChars( passphrase ) ); }
/** * Creates a new authentication with the specified properties * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. * @param privateKeyFile The path to the private key file, may be {@code null}. * @param passphrase The passphrase for the private key file, may be {@code null}. */ public Authentication( String username, String password, String privateKeyFile, String passphrase ) { this( username, privateKeyFile, toChars( password ), toChars( passphrase ) ); }
/** * Creates a basic username+password authentication. * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. */ public Authentication( String username, String password ) { this( username, (String) null, toChars( password ), null ); }
/** * Creates a basic username+password authentication. * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. */ public Authentication( String username, String password ) { this( username, (String) null, toChars( password ), null ); }
/** * Creates a basic username+password authentication. * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. */ public Authentication( String username, String password ) { this( username, (String) null, toChars( password ), null ); }
/** * Creates a new authentication with the specified properties * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. * @param privateKeyFile The path to the private key file, may be {@code null}. * @param passphrase The passphrase for the private key file, may be {@code null}. */ public Authentication( String username, String password, String privateKeyFile, String passphrase ) { this( username, privateKeyFile, toChars( password ), toChars( passphrase ) ); }
/** * Sets the password to use for authentication. * * @param password The password, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassword( String password ) { return setPasswordInternal( toChars( password ) ); }
/** * Sets the passphrase for the private key file. * * @param passphrase The passphrase for the private key file, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassphrase( String passphrase ) { return setPassphraseInternal( toChars( passphrase ) ); }
/** * Sets the passphrase for the private key file. * * @param passphrase The passphrase for the private key file, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassphrase( String passphrase ) { return setPassphraseInternal( toChars( passphrase ) ); }
/** * Sets the password to use for authentication. * * @param password The password, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassword( String password ) { return setPasswordInternal( toChars( password ) ); }
/** * Sets the passphrase for the private key file. * * @param passphrase The passphrase for the private key file, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassphrase( String passphrase ) { return setPassphraseInternal( toChars( passphrase ) ); }
/** * Sets the password to use for authentication. * * @param password The password, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassword( String password ) { return setPasswordInternal( toChars( password ) ); }