Changes the user password permanently.
@param token the reset token. see {@link #generatePasswordResetToken()}
@param newpass the new password
@return true if successful
358415
public final boolean resetPassword(String token, String newpass) {
		if (StringUtils.isBlank(newpass) || StringUtils.isBlank(token) || newpass.length() < Config.MIN_PASS_LENGTH) {
			return false;
		}
		Sysprop s = CoreUtils.getInstance().getDao().read(getAppid(), identifier);
		if (isValidToken(s, Config._RESET_TOKEN, token)) {
			s.removeProperty(Config._RESET_TOKEN);
			String hashed = Utils.bcrypt(newpass);
			s.addProperty(Config._PASSWORD, hashed);
			setPassword(hashed);
			CoreUtils.getInstance().getDao().update(getAppid(), s);
			return true;
		}
		return false;
	}
438865
public function changePassPhrase($old_passphrase, $new_passphrase)
    {
        $args = [
            (string)$old_passphrase,
            (string)$new_passphrase
        ];
        return null === $this->rpc->query("walletPassPhraseChange", $args);
    }
967331
public RequestToken changePassword(String password, BaasHandler<Void> handler) {
        return changePassword(password, RequestOptions.DEFAULT, handler);
    }
896105
public void setPassword(char[] password) {

        LettuceAssert.notNull(password, "Password must not be null");
        this.password = Arrays.copyOf(password, password.length);
    }
1188094
def reset_password user, password
      Oath.config.password_reset_service.new(user, password).perform
    end
705528
public void changePassphrase(String oldpassphrase, String newpassphrase)
			throws IOException, InvalidPassphraseException {
		keyblob = encryptKey(decryptKey(oldpassphrase), newpassphrase);

	}
1163518
public synchronized void refreshWithPassword(PasswordProvider passwordProvider, String clientToken) throws AuthenticationException {
		Objects.requireNonNull(passwordProvider);
		Objects.requireNonNull(clientToken);

		String username = passwordProvider.getUsername();
		String password = passwordProvider.getPassword();
		authResult = authenticationService.login(username, password, clientToken);
		if (authResult.getSelectedProfile() == null) {
			GameProfile[] profiles = authResult.getProfiles();
			if (profiles == null || profiles.length == 0) {
				return;
			}

			// no profile is selected
			// let's select one
			CharacterSelector selector = passwordProvider.getCharacterSelector();
			if (selector == null) {
				selector = new DefaultCharacterSelector();
			}

			GameProfile selectedProfile = selector.select(profiles);
			if (selectedProfile != null) {
				authResult = authenticationService.selectProfile(authResult.getClientToken(), authResult.getAccessToken(), selectedProfile);
			}
		}
	}
1048084
@Override
    public void setPassword(final String password) {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setPassword", "***");
        }
        _password = password;
    }
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!");
    }
797410
public function reset($link, $newPassword)
    {
        // Visit link to get current reset token, username and token expiration
        $this->get($link);
        $this->request->dropCookies();

        $urlData = $this->parseCurrentUrl();

        $isValidUrlData = isset($urlData['query'], $urlData['path']);
        if (!$isValidUrlData) {
            return false;
        }

        $username = trim(str_replace('/pw/', '', $urlData['path']), '/');

        $query = [];

        parse_str($urlData['query'], $query);

        $isValidQuery = isset($query['e'], $query['t']);
        if (!$isValidQuery) {
            return false;
        }

        $request = [
            'username'             => $username,
            'new_password'         => $newPassword,
            'new_password_confirm' => $newPassword,
            'token'                => $query['t'],
            'expiration'           => $query['e'],
        ];

        return $this->post(UrlBuilder::RESOURCE_RESET_PASSWORD_UPDATE, $request);
    }
1070902
public function resetPassword($token)
  {
    if (isset($_SESSION['reset']) &&  $_SESSION['reset']['token'] == $token) {
      if (isset($_POST['resetPassword'])) {
        if ($_POST['password'] == '') {
          $this->errors[] = 'Input new password!';
        }
        if ($_POST['password'] != $_POST['password2']) {
          $this->errors[] = 'The passwords you entered do not match!';
        }
        if (strlen($_POST['password']) < 8) {
          $this->errors[] = 'The password must contain at least 8 characters!';
        }
        if (empty($this->errors)) {
          $changeData = R::findOne('users', 'email = ?', array($_SESSION['reset']['email']));
          $changeData->password = password_hash($_POST['password'], PASSWORD_DEFAULT);

          if (R::store($changeData)) {
            $loadAuthSession = R::findAll('authorization', 'user_id = ?', array($changeData['id']));

            foreach ($loadAuthSession as $load)
            {
              R::trash('authorization', $load['id']);
            }

            mail($_POST['email'], 'Reset Password', "Your password will be restored", 'BulveyzTeam');

            unset($_SESSION['reset']);
            redirect('/login');
          } else {
            exit('Error DataChange');
          }
        } else {
          echo "<div class='alert alert-danger' role='alert'>" . array_shift($this->errors) . "</div>";
        }
      }
    } else {
      exit('404');
    }
  }
12394
public synchronized void refreshWithPassword(String username, String password, CharacterSelector characterSelector) throws AuthenticationException {
		refreshWithPassword(createPasswordProvider(username, password, characterSelector));
	}
762809
public static boolean changePassword(String userName, String newPassword) {
        LOGGER.entering(userName, newPassword.replaceAll(".", "*"));
        boolean changeSucceeded = false;
        File authFile = new File(AUTH_FILE_LOCATION);
        try {
            authFile.delete();
            authFile.createNewFile();
            createAuthFile(authFile, userName, newPassword);
            changeSucceeded = true;
        } catch (Exception e) {
            changeSucceeded = false;
        }
        LOGGER.exiting(changeSucceeded);
        return changeSucceeded;
    }
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);
    }
1105246
def change_password(self, password):
        

        def cb():
            if not utils.is_password_valid(password):
                raise exceptions.AuthError("Invalid Password")
            self.user.change_password(password)
            return True

        return signals.user_update(self, ACTIONS["PASSWORD"], cb)
798550
public function userByResetPasswordToken($token)
    {
        if($email = app('account.password')->getEmailByToken($token)){

            return $this->findByEmail($email);
        }

        return false;
    }
1061787
public void changePassword(final String oldPassword,
            final String newPassword) {

        final Authentication currentUser =
                SecurityContextHolder.getContext().getAuthentication();
        final String username = currentUser.getName();

        if (authenticationManager == null) {
            logger.debug(
                    "No authentication manager set. can't change Password!");

            return;
        } else {
            logger.debug("Re-authenticating user '" + username
                    + "' for password change request.");

            authenticationManager.authenticate(
                    new UsernamePasswordAuthenticationToken(username,
                            oldPassword));
        }

        logger.debug("Changing password for user '" + username + "'");

        final SecurityUser user = (SecurityUser) loadUserByUsername(username);

        user.setPassword(passwordEncoder.encode(newPassword));
        users.add(user);
    }