-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
Description
Summary
The command line interface of jwt-cli alows the typ header field to be specified. The only value it accepts is JWT, though.
There are specifications that recommend or require the typ header field to be something other than JWT. For testing and debugging things using these tokens it would be convenient if jwt-cli allowed the typ header value to be set to a custom value.
Examples:
- RFC 8417 states in section 2.3:
the "typ" value used SHOULD be "secevent+jwt".
- RFC 8225 states in section 4.1:
For the PASSporT, the "typ" header MUST be the string "passport".
Steps to reproduce
$ jwt encode --secret @private-key.pem --alg ES256 --iss=demo --typ='secevent+jwt'
error: invalid value 'secevent+jwt' for '--typ <type>'
[possible values: jwt]
For more information, try '--help'.
Expected behavior
jwt-cli emits a JWT with the typ header field containing the value given in the --typ command line argument.
Reactions are currently unavailable