def get_discharge(ctx, cav, payload):
     checker = common.ThirdPartyCheckerWithCaveats([
         checkers.declared_caveat('foo', 'a'),
         checkers.declared_caveat('arble', 'b')
     ])
     return macaroonbakery.discharge(ctx, cav.caveat_id_bytes, payload,
                                     third_party.oven.key, checker,
                                     third_party.oven.locator)
        def get_discharge(ctx, cav, payload):
            checker = common.ThirdPartyCheckerWithCaveats([
                checkers.declared_caveat('foo', 'a'),
                checkers.declared_caveat('arble', 'b'),
            ])

            # Sneaky client adds a first party caveat.
            m = macaroonbakery.discharge(ctx, cav.caveat_id_bytes, payload,
                                         third_party.oven.key, checker,
                                         third_party.oven.locator)
            m.add_caveat(checkers.declared_caveat('foo', 'c'), None, None)
            return m