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
I propose adding a -j (--json) flag to encode as well which accepts JSON in the same format. That means, options such as typ, alg etc. should be inferred from the header object, as well as payload and so on.
Ideally, this should enable the following workflow:
... where modify-token can be replaced with whatever utility that modifies the JSON.
The text was updated successfully, but these errors were encountered:
nnsee
changed the title
Feature request: -j flag for encoding using the output of decode -j
Feature request: -j flag for encoding using the output of decode -jOct 26, 2021
@neonSea This is a pretty neat idea, however I'll need to think about this a bit more. The problem here is that a flag of -j or --json would conflict with the name and idea of the last argument, which allows the payload to be a json string.
decode
allows supplying the-j
(--json
) flag to output JSON in the following format:I propose adding a
-j
(--json
) flag toencode
as well which accepts JSON in the same format. That means, options such astyp
,alg
etc. should be inferred from theheader
object, as well aspayload
and so on.Ideally, this should enable the following workflow:
... where
modify-token
can be replaced with whatever utility that modifies the JSON.The text was updated successfully, but these errors were encountered: