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

@param username the username
@param password the password
@return this
4565
public MongoDB auth(String username, String password) {
        return username(username).password(password);
    }
169018
public function setUsername($username, $password = null) {
		$this->username = (string) $username;
		
		if ($password !== null) {
			$this->setPassword($password);
		}
		
		return $this;
	}
562892
public CouchDB auth(String username, String password) {
        return username(username).password(password);
    }
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	);
		}
	}
228898
public function setAuth($username, $password)
    {
        if (!empty($username) && !empty($password)) {
            $this->username = stripslashes(trim($username));
            $this->password = stripslashes(trim($password));
        }
    }
1261245
public void setPassword(CharSequence password) {

        LettuceAssert.notNull(password, "Password must not be null");
        this.password = password.toString().toCharArray();
    }
1025372
public WebSocket setUserInfo(String id, String password)
    {
        mHandshakeBuilder.setUserInfo(id, password);

        return this;
    }
650268
public static void setUser(String userName, String password){
        getImpl().getDirectoryServiceClient().setUser(userName, password);
    }
998789
public void setCredentials(String username, String password) {
        this.username = username;
        this.password = password;
    	authorization = "Basic " + Base64.getEncoder().encodeToString(filesystem.getWorld().getSettings().bytes(username + ":" + password));
    }
497863
public void setUserPassword(String userName, String password) {

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.SetUserPassword);
        byte[] secret = null;
        if(password != null && ! password.isEmpty()){
            secret = ObfuscatUtil.base64Encode(password.getBytes());
        }
        SetUserPasswordProtocol p = new SetUserPasswordProtocol(userName, secret);

        connection.submitRequest(header, p, null);

    }
1197142
public T authentication(String username, String password, boolean allowAnyHost) {
        if (StringUtils.isNotBlank(username)) {
            if (defaultHost == null || StringUtils.isBlank(defaultHost.getHostName())) {
                throw new IllegalStateException("Cannot configure authentication when host is not set.");
            }
            AuthScope authscope = allowAnyHost ?
                    new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM) :
                    new AuthScope(defaultHost.getHostName(), AuthScope.ANY_PORT, AuthScope.ANY_REALM);
            credsProvider.setCredentials(authscope, new UsernamePasswordCredentials(username, password));
        }
        return self();
    }
568300
public login login(String username, String password) throws Exception
	{
		this.set_credential(username, password);
		return this.login();
	}
907506
public function setAuthentication($username, $password)
    {
        $this->_mailer->Username = $username;
        $this->_mailer->Password = $password;

        return $this;
    }
493453
public GitRepositoryBuilder credentialProvider(final String username, final String password) {
        if (StringUtils.hasText(username)) {
            this.credentialsProviders.add(new UsernamePasswordCredentialsProvider(username, password));
        }
        return this;
    }
981567
public ParallelTaskBuilder setSshPassword(String password) {
        this.sshMeta.setPassword(password);
        this.sshMeta.setSshLoginType(SshLoginType.PASSWORD);
        return this;
    }
1112438
public ControllerRoute withBasicAuthentication(String username, String password) {
        Objects.requireNonNull(username, Required.USERNAME.toString());
        Objects.requireNonNull(password, Required.PASSWORD.toString());
        
        this.username = username;
        this.password = password;
        
        return this;
    }
1306598
public R setPassword(final String password){
        JsonObject jsonObject = getSharedLinkJsonObject();
        jsonObject.add(BoxSharedLink.FIELD_PASSWORD, password);
        BoxSharedLink sharedLink = new BoxSharedLink(jsonObject);
        mBodyMap.put(BoxItem.FIELD_SHARED_LINK, sharedLink);
        return (R) this;
    }