mike-engel/jwt-cli

Add support for TTL when generating JWTs

Closed this issue · 3 comments

Thanks for this tool! It would be great to be able to use a --ttl option, instead of -exp, to specify the number of seconds in which the new token should expire relative to current system time, e.g.

jwt encode '{ "tokenIsvalidFor": "15 minutes }' --ttl=900 --secret=[SECRET]

You mean something like this?

main...rostamn739:jwt-cli:main

Or you could just give a valid 'duration' string to the exp аrgument as with current code, it will work

Ah ok - didn't get that from the docs, but that's perfect.