You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Roger, thanks for your work on macaroons! I'm trying to take a serialized macaroon generated via libmacaroons using python and verify it using a node app. I noticed you also helped with libmacaroons, so I was perhaps naively assuming they can work together in a decentralized system. Is there a way to do this? (Any "caveats" ? ;)
Using the python cli:
>>> import macaroons
>>> secret = 'this is our super secret key; only we should know it'
>>> public = 'we used our secret key'
>>> location = 'http://mybank/'
>>> M = macaroons.create(location, secret, public)
>>> M.serialize()
'MDAxY2xvY2F0aW9uIGh0dHA6Ly9teWJhbmsvCjAwMjZpZGVudGlmaWVyIHdlIHVzZWQgb3VyIHNlY3JldCBrZXkKMDAyZnNpZ25hdHVyZSDj2eApCFJsTAA5rhURQRXZf91ovyujebNCqvD2F9BVLwo'
I can just do this: > m = Macaroon.import({'location': 'http://mybank/', 'identifier': 'we used our secret key', 'cid': 'account = 3735928559', 'signature': '1efe4763f290dbce0c1d08477367e11f4eee456a64933cf662d79772dbb82128'});
...but of course I don't want to pass that json-encoded string around. Is there a way to deserialize in nodejs a macaroon that was serialized using the python cli? Are there any usage examples out there? Thanks and regards
The text was updated successfully, but these errors were encountered:
Unfortunately we don't currently support the binary encoding format in js-macaroon. It wouldn't be hard - it just wasn't a priority for us as we haven't been using the binary format in production up until now.
Hi Roger, thanks for your work on macaroons! I'm trying to take a serialized macaroon generated via libmacaroons using python and verify it using a node app. I noticed you also helped with libmacaroons, so I was perhaps naively assuming they can work together in a decentralized system. Is there a way to do this? (Any "caveats" ? ;)
Using the python cli:
Using the nodejs cli:
I can just do this:
> m = Macaroon.import({'location': 'http://mybank/', 'identifier': 'we used our secret key', 'cid': 'account = 3735928559', 'signature': '1efe4763f290dbce0c1d08477367e11f4eee456a64933cf662d79772dbb82128'});
...but of course I don't want to pass that json-encoded string around. Is there a way to deserialize in nodejs a macaroon that was serialized using the python cli? Are there any usage examples out there? Thanks and regards
The text was updated successfully, but these errors were encountered: