-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to generate a tenant authorization token #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is super helpful, ty!
sample usage:
$ #set paladin demov3 key
$ ./elv-live tenant_auth_token /tnt/wlt/iten4TXq2en3qtu3JREnE5tSLRf9zLod > /tmp/f ; tok=`grep Auth /tmp/f` ; path=`grep iten /tmp/f` ; curl -s -H "$tok" http://localhost:6546$path
utilities/EluvioLiveCli.js
Outdated
console.log(message) | ||
console.log(`Authorization: Bearer ${multiSig}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we return a YAML that can have message and token? The other commands return YAML (which is both human readable-ish and command line parseable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~/e/git/elv-live-js $ ./elv-live tenant_auth_token '{"hello":123}'
Network: demov3
Timestamped path or body: {"hello":123,"ts":1689024549073}
Token: Authorization: Bearer ES256K_LtRWGcHG3y9EiRpMu7YKU8doYXmSSXPGgGfpbUjq8PKyMdXrD9Ngn9HhoxARMhovogzG4FnUvwapRyQSZMmzDrM2B
~/e/git/elv-live-js $ ./elv-live tenant_auth_token "/nft/pack/spec/0x59267d3eff5a4a595f6bfb790d18ed6af358653a"
Network: demov3
Timestamped path or body: /nft/pack/spec/0x59267d3eff5a4a595f6bfb790d18ed6af358653a?ts=1689025512273
Token: Authorization: Bearer ES256K_En3WkxJQBgHuLazoZ9NYMkEWiLg9M3vfesccRtd3sdACMzfG3tvEhiA2Xtrqwr74WHqKtHRXJngvdBSEevRvhTxAf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this is valid YAML with the extra colons
9a3d90c
to
ab99147
Compare
Useful for testing the authd HTTP API at least