def set_password(self, request, password, user=None, auth_key=None):
        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')
Support instance methods
dataset/ETHPy150Open quantmind/lux/lux/extensions/auth/backends.py/AuthMixin.set_password--crossover with--dataset/ETHPy150Open timothycrosley/hug/hug/interface.py/Local.__get__