Asks to change a password for a given user.
545700
def change_password(self, client_id, email, connection, password=None):
        

        return self.post(
            'https://{}/dbconnections/change_password'.format(self.domain),
            data={
                'client_id': client_id,
                'email': email,
                'password': password,
                'connection': connection,
            },
            headers={'Content-Type': 'application/json'}
        )
1156212
def allow_password_change?
        if params[:old_password]
          unless @user.authenticate(params[:old_password])
            raise ApplicationController::UNAUTHORIZED_ERROR 
          end
        else
          unless @token == @user.reset_token
            raise ApplicationController::UNAUTHORIZED_ERROR
          end
        end
        return true
      end
1069710
def setPassword(self, userId, password):
    '''
    
    '''
    self._setHeaders('setPassword')
    return self._sforce.service.setPassword(userId, password)
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'))
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);
    }
56279
def change_password(self, password):
        
        self.update(password_hash=self.encrypt_password(password),
                    require_password_change=False)

        # Whenever the password is changed, reset the secret key to invalidate
        # any tokens in the wild
        self.reset_secret_key()
898415
def change_password(username, password)
      new_action = { 'Password' => password }
      userhref = userhref('/redfish/v1/AccountService/Accounts/', username)
      response = rest_patch(userhref, body: new_action)
      response_handler(response)
      true
    end
900417
def password(client, path):
    """"""
    if path.startswith('user:'):
        update_user_password(client, path[5:])
    else:
        update_generic_password(client, path)
840386
def user(ctx, username, password):
    """"""

    ctx.obj['username'] = username
    ctx.obj['password'] = password
636689
public boolean changePassword(String password, User user) {
		user.setPassword(CryptManager.passwordHash(password));
		this.dao.persist(user);

		return true;
	}
1145439
def prompt_for_new_password():
    
    while True:
        passw = getpass.getpass()
        passw2 = getpass.getpass()
        if passw == passw2: return passw
        print 'Passwords do not match'
977386
def change_password(self, new_password):
        
        self.set_password(new_password)
        self.save()
        password_changed.send(sender=self.__class__, user=self)
540000
def change_password(username, new_password):
    
    assert username in passwd_reader.load_users(),\
           "Username '%s' not found!" % username

    sh.ftpasswd(
        "--change-password",
        passwd=True,        # passwd file, not group file
        name=username,
        stdin=True,         # tell ftpasswd to read password from stdin
        file=settings.LOGIN_FILE,
        _in=new_password
    )

    reload_configuration()
64957
def set_password(query, password, send_email):
    
    user = _query_to_user(query)
    if click.confirm(f'Are you sure you want to change {user!r}\'s password?'):
        security_service.change_password(user, password, send_email=send_email)
        user_manager.save(user, commit=True)
        click.echo(f'Successfully updated password for {user!r}')
    else:
        click.echo('Cancelled.')
863223
def update_user(self, user, name=None, password=None, host=None):
        
        return self._user_manager.update(user, name=name, password=password,
                host=host)
162180
def password_change(self, request):
        
        from django.contrib.auth.views import password_change
        url = reverse('admin:cms_password_change_done')
        defaults = {
            'post_change_redirect': url,
            'template_name': 'cms/password_change_form.html',
        }
        if self.password_change_template is not None:
            defaults['template_name'] = self.password_change_template
        return password_change(request, **defaults)
731403
def set_password(self, user, password):
        
        url = self._build_url(self.endpoint.set_password(id=user))
        return self._post(url, payload=dict(password=password))