Add support for TTL when generating JWTs
Closed this issue · 3 comments
stephent commented
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]
rostamn739 commented
You mean something like this?
rostamn739 commented
Or you could just give a valid 'duration' string to the exp
аrgument as with current code, it will work
stephent commented
Ah ok - didn't get that from the docs, but that's perfect.