/*
Sets the authentication information that should be used for the connector

@param username the username
@param password the password
@return this
19245
public SFTP auth(String username, String password) {
        return username(username).password(password);
    }
1316055
public void authenticate(String username, String password) {
        ldapTemplate.authenticate(query().where("objectClass").is("simpleSecurityObject").and("cn").is(username), password);
        LOGGER.info("Successfully authenticated " + username);
    }
408748
public static Authentication plain(String username, String password) {
        return new AuthenticationImpl(username, password, AuthMode.Plain);
    }
816232
public void setCredential(String username, String password) {
	if (username != null) {
	    env.put("java.naming.security.principal", username);
	    env.put("java.naming.security.credentials", password);
	}
	else {
	    env.remove("java.naming.security.principal");
	    env.remove("java.naming.security.credentials");
	}
    }
1303993
public void setCredentials(String userid, String password) {
        Map<String, String> data = new HashMap<String, String>();
        data.put("userid", userid);
        data.put("password", password);
        RemotingHeader header = new RemotingHeader(RemotingHeader.CREDENTIALS, true, data);
        headers.put(RemotingHeader.CREDENTIALS, header);
    }
1042216
protected Account authenticate(String username, String password) {
        StandardCredentials authenticationToken = new StandardCredentials(username, password);
        Account account = securityManager.authenticate(authenticationToken);
        return account;
    }
133692
public function setCredentials($username, $password)
    {
        $this->username = $username;
        $this->password = $password;

        return $this;
    }
1195586
public void setUserPassword(String password) {
		try {
			getSipURI().setUserPassword(password);
		} catch (ParseException e) {
			logger.error("error setting parameter ", e);
			throw new IllegalArgumentException("Bad arg", e	);
		}
	}
562892
public CouchDB auth(String username, String password) {
        return username(username).password(password);
    }
367236
protected boolean configureUsernamePassword(final GitHubClient client,
			final String userName, final String password) {
		if (StringUtils.isEmpty(userName, password))
			return false;

		if (isDebug())
			debug("Using basic authentication with username: " + userName);
		client.setCredentials(userName, password);
		return true;
	}
359096
public FTPUploadRequest setUsernameAndPassword(String username, String password) {
        if (username == null || "".equals(username)) {
            throw new IllegalArgumentException("Specify FTP account username!");
        }

        if (password == null || "".equals(password)) {
            throw new IllegalArgumentException("Specify FTP account password!");
        }

        ftpParams.username = username;
        ftpParams.password = password;
        return this;
    }
228898
public function setAuth($username, $password)
    {
        if (!empty($username) && !empty($password)) {
            $this->username = stripslashes(trim($username));
            $this->password = stripslashes(trim($password));
        }
    }
231638
public synchronized void refreshWithPassword(String username, String password) throws AuthenticationException {
		refreshWithPassword(username, password, null);
	}
429848
public void setBasicUsernamePassword(String username, String password) {
        this.username = username;
        this.password = password;
        LOG.debug("use basic username/password {}/********", username);

        userPassCredentialsProvider = new BasicCredentialsProvider();
        userPassCredentialsProvider.setCredentials(AuthScope.ANY,
            new UsernamePasswordCredentials(username, password));

        authCache = new BasicAuthCache();
        BasicScheme basicAuth = new BasicScheme();
        authCache.put(httpHost, basicAuth);
    }
315271
public void setUser(String userName, String password){
        if(userName != null && ! userName.isEmpty()){
            connection.setDirectoryUser(userName, password);
        }
    }
1282012
public CRestBuilder basicAuth(String username, String password) {
        this.auth = "basic";
        this.username = username;
        this.password = password;
        return this;
    }
412178
public function setBasicAuth(string $username, string $password)
    {
        $this->basicAuthUsername = $username;
        $this->basicAuthPassword = $password;
        return $this;
    }