

def set_password(self, request, password, user=None, auth_key=None):
    'Set a new password for user\n        '
    if ((not user) and auth_key):
        user = self.confirm_auth_key(request, auth_key, True)
    if (not user):
        raise AuthenticationError('No user')
    with request.app.odm().begin() as session:
        user.password = self.password(password)
        session.add(user)
    return json_message(request, 'password changed')

dataset/ETHPy150Open quantmind/lux/lux/extensions/auth/backends.py AuthMixin.set_password/original