Changes the login password

        :param new_password: The new login password to set for the account
        :param email: The current email of the account
545464
def change_password(self, new_password, email):
        
        log.info("[+] Changing the password of the account")
        return self._send_xmpp_element(account.ChangePasswordRequest(self.password, new_password, email, self.username))
597780
def change_password():
    
    basic_auth = '%s:%s' % (DEFAULT_USERNAME, DEFAULT_PASSWORD)
    try:  # Python 2
        auth = base64.encodestring(basic_auth)
    except TypeError:  # Python 3
        auth = base64.encodestring(bytes(basic_auth, 'utf-8')).decode()

    headers = {
        "Content-Type": "application/json",
        "Accept": "application/json",
        "Authorization": "Basic %s" % auth.strip()
    }
    
    response = None
    retry = 0
    while not response:  # Retry if the server is not ready yet
        sleep(1)
        con = http.HTTPConnection('localhost:7474', timeout=10)
        try:
            con.request('GET', 'http://localhost:7474/user/neo4j', headers=headers)
            response = json.loads(con.getresponse().read().decode('utf-8'))
        except ValueError:
            con.close()
        retry += 1
        if retry > 10:
            print("Could not change password for user neo4j")
            break
    if response and response.get('password_change_required', None):
        payload = json.dumps({'password': 'testing'})
        con.request('POST', 'http://localhost:7474/user/neo4j/password', payload, headers)
        print("Password changed for user neo4j")
    con.close()
637951
def change_password(self, user, password):
        
        if not self.__contains__(user):
            raise UserNotExists
        self.new_users[user] = self._encrypt_password(password) + "\n"
449187
def update_password(user, password):
    
    user.password = hash_password(password)
    _datastore.put(user)
    send_password_reset_notice(user)
    password_reset.send(app._get_current_object(), user=user)
306269
def set_password(self, password):
        
        self.password = password
        self.changed_event.emit(self)
42940
def set_authorization_password(self, password):
        
        self.authorization_password = password
        self.changed_event.emit(self)
326864
def login(self, email=None, password=None, app_id=None, api_key=None):
        
        session_token = self.api.user_get_session_token(
            app_id=app_id, email=email, password=password, api_key=api_key)

        # install session token back into api client
        self.api.session = session_token
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'))
837207
public static SignInResponse signIn(String email, String password){
        return signIn(new LoginCredentials(email,password));
    }
1002836
def change_email(self, email, as_username=False):
        
        email = email.lower()
        data = {"email": email}
        if self.email != email:
            if self.get_by_email(email):
                raise exceptions.AuthError("Email exists already")
            if as_username:
                if self.username != email:
                    if self.get_by_username(email):
                        raise exceptions.AuthError("Username exists already")
                data["username"] = email

            self.update(**data)
659542
def updatePassword(self,
                       user,
                       currentPassword,
                       newPassword):
        """"""
        return self.__post('/api/updatePassword',
                           data={
                               'user': user,
                               'currentPassword': currentPassword,
                               'newPassword': newPassword
                           })
1373261
def change_password(request):
    '''
    
    '''
    serializer = ChangePasswordSerializer(data=request.data,
                                          context={'request': request})
    serializer.is_valid(raise_exception=True)

    user = request.user
    user.set_password(serializer.validated_data['password'])
    user.save()
    return get_ok_response('Password changed successfully')
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,
        )
807022
def setpassword(self, password):
        
        self._password = password
        if self._file_parser:
            if self._file_parser.has_header_encryption():
                self._file_parser = None
        if not self._file_parser:
            self._parse()
        else:
            self._file_parser.setpassword(self._password)
1188094
def reset_password user, password
      Oath.config.password_reset_service.new(user, password).perform
    end
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.')
1033310
def change_password(self, previous, new_password):
        
        if not self.verify_password(previous):
            raise exceptions.Unauthorized('Incorrect password')

        if len(new_password) < options.min_length_password:
            msg = ('Passwords must be at least {} characters'
                   .format(options.min_length_password))
            raise exceptions.ValidationError(msg)

        if len(new_password) > options.max_length_password:
            msg = ('Passwords must be at no more than {} characters'
                   .format(options.max_length_password))
            raise exceptions.ValidationError(msg)

        self.password = self.hash_password(new_password)
        yield self._save()