def authenticated(self, with_password=True, password=''):
        if with_password:
            return bcrypt.check_password_hash(self.password, password)

        return True
Ensure a user is authenticated, and optionally check their password.
dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/blueprints/user/models.py/User.authenticated