Allow for non-interactive token generation
Current situation
The generate token using ...
command is interactive. There is no way to use it, say, in a script.
There exists other tools that can generate a token from command-line arguments, but requiring the use of another tool can be tedious.
Desired outcome
A way to generate token in a non-interactive way, or at least to pass some arguments from the command line.
The following command-line options could be used:
--algorithm ALGORITHM: the algorithm to use
--issuer ISSUER: the issuer
--subject SUBJECT: the subject
--expiration EXPIRATION: the expiration date in YYYY/MM/DD format
--output-file FILE
In order to generate a token in a fully-non-interactive way, all parameters must be specified explicitly. If the token should not expire, use --expiration=''
.
If the file exists, a confirmation should be asked for. (A non-interactive call would simply ensure the output file does not exist before generating the token.)
Edited by Martin Lafaix