def is_valid_token(self, token):

        key = 'user_password_token_{id}'.format(id=self['id'])
        entoken = redis.get(key)
        redis.delete(key)
        if entoken:
            entoken = entoken.decode()
            return bcrypt.verify(self['id'] + token, entoken)
        return False
Ensure the given token is valid.
dataset/ETHPy150Open heiskr/sagefy/server/models/user.py/User.is_valid_token