Changes password and sends a signal
977386
def change_password(self, new_password):
        
        self.set_password(new_password)
        self.save()
        password_changed.send(sender=self.__class__, user=self)
700918
def change_password(self):
        
        form = self._get_form('SECURITY_CHANGE_PASSWORD_FORM')
        if form.validate_on_submit():
            self.security_service.change_password(
                current_user._get_current_object(),
                form.new_password.data)
            self.after_this_request(self._commit)
            self.flash(_('flask_unchained.bundles.security:flash.password_change'),
                       category='success')
            if request.is_json:
                return self.jsonify({'token': current_user.get_auth_token()})
            return self.redirect('SECURITY_POST_CHANGE_REDIRECT_ENDPOINT',
                                 'SECURITY_POST_LOGIN_REDIRECT_ENDPOINT')

        elif form.errors and request.is_json:
            return self.errors(form.errors)

        return self.render('change_password',
                           change_password_form=form,
                           **self.security.run_ctx_processor('change_password'))
524990
def change_password(self, password):
        
        self.make_request(
            ModificationFailed,
            method='update',
            resource='change_password',
            params={'password': password})
151734
function changePassword(masterPassword, newPassword1, newPassword2) {
    if (newPassword1 !== newPassword2) throw new Error("New passwords must match.");
    else {
        var contents = getContents(masterPassword);
        init(newPassword1, contents);
    }
}
739833
function onConfirmPasswordReset() {
  var code = $('#password-reset-code').val();
  var password = $('#password-reset-password').val();
  auth.confirmPasswordReset(code, password).then(function() {
    alertSuccess('Password has been changed!');
  }, onAuthError);
}
649287
def request_password_reset(self, user, base_url):
        
        user.generate_password_link()
        db.session.add(user)
        db.session.commit()
        events.password_change_requested_event.send(user)
        self.send_password_change_message(user, base_url)
720660
def renew_connection(password):
    
    with Controller.from_port(port=9051) as controller:
        controller.authenticate(password=password)
        controller.signal(Signal.NEWNYM)
42940
def set_authorization_password(self, password):
        
        self.authorization_password = password
        self.changed_event.emit(self)
677145
def _password(self, password):
        
        with self.lock:
            self.send('PASS :%s' % password, error_check=True)
174491
def send_reset_password_email(self, user, user_email):
        """"""

        # Verify config settings
        if not self.user_manager.USER_ENABLE_EMAIL: return
        assert self.user_manager.USER_ENABLE_FORGOT_PASSWORD

        # The reset_password email is sent to a specific user_email.email or user.email
        email = user_email.email if user_email else user.email

        # Generate a reset_password_link
        token = self.user_manager.generate_token(user.id)
        reset_password_link = url_for('user.reset_password', token=token, _external=True)

        # Render email from templates and send it via the configured EmailAdapter
        self._render_and_send_email(
            email,
            user,
            self.user_manager.USER_RESET_PASSWORD_EMAIL_TEMPLATE,
            reset_password_link=reset_password_link,
        )
75637
def change_user_password(user, password):
    
    user.password = hash_password(password)
    _datastore.put(user)
    send_password_changed_notice(user)
    password_changed.send(current_app._get_current_object(),
                          user=user)
508363
def send_password_changed_email(self, user):
        """"""

        # Verify config settings
        if not self.user_manager.USER_ENABLE_EMAIL: return
        if not self.user_manager.USER_SEND_PASSWORD_CHANGED_EMAIL: return

        # Notification emails are sent to the user's primary email address
        user_or_user_email_object = self.user_manager.db_manager.get_primary_user_email_object(user)
        email = user_or_user_email_object.email

        # Render email from templates and send it via the configured EmailAdapter
        self._render_and_send_email(
            email,
            user,
            self.user_manager.USER_PASSWORD_CHANGED_EMAIL_TEMPLATE,
        )
637951
def change_password(self, user, password):
        
        if not self.__contains__(user):
            raise UserNotExists
        self.new_users[user] = self._encrypt_password(password) + "\n"
1245008
@Override
    public void changePassword(String username, String password)
            throws AuthenticationException {
        String user = file_store.getProperty(username);
        if (user == null) {
            throw new AuthenticationException("User '" + username
                    + "' not found.");
        }
        // Encrypt the new password
        String ePwd = encryptPassword(password);
        file_store.put(username, ePwd);
        try {
            saveUsers();
        } catch (IOException e) {
            throw new AuthenticationException("Error changing password: ", e);
        }
    }
642430
def change_password(*_, user_id=None, password=None):
    
    click.echo(green('\nChange password:'))
    click.echo(green('-' * 40))

    with get_app().app_context():
        user = find_user(dict(id=user_id))
        if not user:
            click.echo(red('User not found\n'))
            return

        result = user_service.change_password(user, password)
        if isinstance(result, User):
            msg = 'Changed password for user {} \n'.format(user.email)
            click.echo(green(msg))
            return

        print_validation_errors(result)
        return
542200
async def set_password(self, password):
        
        await self.controller.change_user_password(self.username, password)
        self._user_info.password = password
270955
def switch_user(self, username, password):
        
        self._username = username
        self._password = password