The vid and cl fields are optional in the JSON macaroon format, but
JsonSerializer.deserialize raises a missing key exception
if a caveat doesn't have them.
Probably the code should be:
verification_key_id=(
standard_b64decode(c['vid']) if c.get('vid') else None
),
The vid and cl fields are optional in the JSON macaroon format, but JsonSerializer.deserialize raises a missing key exception if a caveat doesn't have them.
Probably the code should be:
(using
c.get('vid')
rather thanc['vid']
)