Set user password.

@param userName
the user name.
@param password
the user 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);

    }
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);
    }
76950
public function setDigestAuthentication($username, $password = '')
    {
        $this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
        $this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
    }
636689
public boolean changePassword(String password, User user) {
		user.setPassword(CryptManager.passwordHash(password));
		this.dao.persist(user);

		return true;
	}
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;
	}
125505
public void setCredentials(String tenant, String username, String userpassword) {
        Credentials credentials = new Credentials(tenant, username, userpassword);
        restClient.setCredentials(credentials);
    }
983226
public function userWithPass($username, $password)
    {
        $header = base64_encode(sprintf('%s:%s', $username, $password));

        $this->headers['Authorization'] = 'Basic ' . $header;
    }
666426
def set_password(self, password):
        
        self.password = Security.hash(password)
        self.save()
950280
public void setPassword(String password) {
        for (Authentication auth : authentications.values()) {
            if (auth instanceof HttpBasicAuth) {
                ((HttpBasicAuth) auth).setPassword(password);
                return;
            }
        }
        throw new RuntimeException("No HTTP basic authentication configured!");
    }
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");
	}
    }
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	);
		}
	}
54685
def set_password(self, service, username, password):
        
        segments = range(0, len(password), self._max_password_size)
        password_parts = [
            password[i:i + self._max_password_size] for i in segments]
        for i, password_part in enumerate(password_parts):
            curr_username = username
            if i > 0:
                curr_username += '{{part_%d}}' % i
            self._keyring.set_password(service, curr_username, password_part)
1163288
public void connect(String username, char[] password) {
        doConnect(() -> {
            return CommandContextFactory.getInstance().
                    newCommandContext(new CommandContextConfiguration.Builder()
                    .setUsername(username)
                    .setPassword(password)
                    .setErrorOnInteract(false)
                    .build());
        });
    }
225885
public T authentication(String username, String password) {
        return authentication(username, password, false);
    }
513396
public static void putPasswordResetUsername(final RequestContext requestContext, final String username) {
        val flowScope = requestContext.getFlowScope();
        flowScope.put("username", username);
    }
568300
public login login(String username, String password) throws Exception
	{
		this.set_credential(username, password);
		return this.login();
	}
153420
@Override
    public void login(String username, String password)
            throws ServletException {
        this._getHttpServletRequest().login(username,password);
    }