If the user select "Yes, I have a password", we check the password.
334442
public function verifyAccount($value, ExecutionContextInterface $context)
    {
        if ($value == 1) {
            $data = $context->getRoot()->getData();
            if (false === $data['password'] || (empty($data['password']) && '0' != $data['password'])) {
                $context->getViolations()->add(new ConstraintViolation(
                    Translator::getInstance()->trans('This value should not be blank.'),
                    'account_password',
                    array(),
                    $context->getRoot(),
                    'children[password].data',
                    'propertyPath'
                ));
            }
        }
    }
304112
async function confirmResetPassword(form) {
  await client.connect();
  try {
    console.log("token : ", sessionStorage.getItem("token"));
    await api.confirmResetPassword(
      {
        token: sessionStorage.getItem("token"),
        firstPassword: form.firstPassword.value,
        secondPassword: form.secondPassword.value
      },
      "user"
    );
    displayMessage("Reset password", "Password changed", "is-success");
    goTo("login");
    sessionStorage.clear();
  } catch (e) {
    displayMessage(
      "Reset password",
      `Failed to reset the password. Cause: ${e.message}`,
      "is-danger"
    );
  }
}
220039
def prompt_and_confirm_password(self, message):
        
        while True:
            pwd = self.input_password(message)
            cpwd = self.input_password("Confirm password")
            if pwd == cpwd:
                return pwd
            else:
                self.__screen.cprintln("Passwords do not match.")
188330
def check_basic_auth(self, username, password):
        
        valid = self.users.check_password(
            username, password
        )
        if not valid:
            log.warning('Invalid login from %s', username)
            valid = False
        return (
            valid,
            username
        )
377381
protected function checkPasswords()
    {
        if($this->getOriginal('password') != $this->password){

            if($this->password === $this->password_confirmation){

                // Hashes password and unset password_confirmation field
                $this->password = bcrypt($this->password);

                unset($this->password_confirmation);

            } else {

                return false;
            }

        }

        return true;
    }
844648
private boolean check(final String _plainPassword,
                          final int _pos)
    {
        boolean ret = false;
        if (this.props.containsKey(PasswordStore.DIGEST + _pos)) {
            final ConfigurablePasswordEncryptor passwordEncryptor = new ConfigurablePasswordEncryptor();
            this.digesterConfig.setAlgorithm(this.props.getProperty(PasswordStore.ALGORITHM + _pos));
            this.digesterConfig.setIterations(this.props.getProperty(PasswordStore.ITERATIONS + _pos));
            this.digesterConfig.setSaltSizeBytes(this.props.getProperty(PasswordStore.SALTSIZE + _pos));
            passwordEncryptor.setConfig(this.digesterConfig);
            ret = passwordEncryptor.checkPassword(_plainPassword, this.props.getProperty(PasswordStore.DIGEST + _pos));
        }
        return ret;
    }
210166
def password_prompt(ctx, param, value):
    """"""
    if ctx.resilient_parsing:
        return

    if not value:
        if 'password_stdin' in ctx.params:
            with click.open_file('-') as fp:
                value = fp.read().strip('\n')
        else:
            value = click.prompt('Password', hide_input=True)

    click.echo(value)
    return value
894656
def is_password(self, is_password):
        

        if is_password:
            self.is_forgetable = True

        self._is_password = is_password
613096
private void verifyPasswordStrength() {
        if (isEnabled() && !constraints.isEmpty() && !TextUtils.isEmpty(getText())) {
            float score = getPasswordStrength();
            adaptHelperText(score);
        } else {
            setHelperText(regularHelperText);
        }
    }
761506
public function checkUserCredentials($username, $password)
    {
        if ($user = $this->getUser($username)) {
            return $this->checkPassword($user, $password);
        }

        return false;
    }
420980
function comparePassword(candidatePassword, callback) {
  bcrypt.compare(candidatePassword, this.password, (err, isMatch) => {
    if (err) {
      return callback(err);
    }

    callback(null, isMatch);
  });
}
245414
def authenticate(self, user, password):
        """"""
        assert user['password_hash'] == '_'.join((password, 'hash'))
        self.logger.debug('User %s has been successfully authenticated',
                          user['uid'])
244094
def login_password(self, value):
        """"""
        password = self.selenium.find_element(*self._password_input_locator)
        password.clear()
        password.send_keys(value)
1021177
def check_password(self, raw_password):
        """"""
        return xmpp_backend.check_password(self.node, self.domain, raw_password)
1247061
public function validatePassword()
    {
        /* @var $user User */
        $user = Yii::$app->user->identity;
        if (!$user || !$user->validatePassword($this->oldPassword)) {
            $this->addError('oldPassword', 'Incorrect old password.');
        }
    }
755688
protected boolean isPasswordValid() {

        if ((m_pw.getPassword1() == null) | (m_pw.getPassword2() == null)) {
            return false;
        }
        try {
            CmsPasswordInfo pwdInfo = new CmsPasswordInfo();
            pwdInfo.setNewPwd(m_pw.getPassword1());
            pwdInfo.setConfirmation(m_pw.getPassword2());

            pwdInfo.validate();
            return true;
        } catch (CmsIllegalArgumentException | CmsIllegalStateException e) {
            LOG.error("New password is not ok", e);
            return false;
        }
    }
974364
def check_password(cls, instance, raw_password, enable_hash_migration=True):
        
        verified, replacement_hash = instance.passwordmanager.verify_and_update(
            raw_password, instance.user_password
        )
        if enable_hash_migration and replacement_hash:
            if six.PY2:
                instance.user_password = replacement_hash.decode("utf8")
            else:
                instance.user_password = replacement_hash
        return verified