We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no way to set headers on a token when encoding via the command line.
Command line arguments should accept some kind of headers input and pass it to encode().
encode()
Headers cannot be set.
pyjwt --key=secret --alg='RS256' encode iss=issuer aud=audience sub=subject exp=123456789 headers=foo
headers value will appear in the payload.
headers
You can see that no header value is passed to encode() here:
pyjwt/jwt/__main__.py
Lines 46 to 50 in 6845515
But encode() supports header information:
pyjwt/jwt/api_jwt.py
Line 45 in 6845515
$ python -m jwt.help
{ "cryptography": { "version": "2.6.1" }, "implementation": { "name": "CPython", "version": "3.7.0" }, "platform": { "release": "17.7.0", "system": "Darwin" }, "pyjwt": { "version": "1.7.1" } }
The text was updated successfully, but these errors were encountered:
@Botono wanna put together a pull request?
Sorry, something went wrong.
I'd like to help out with this.
@justinbaur that'd be awesome, thanks!
Is there any chance you'd consider making a new version with this change? It'd make my life considerably easier.
Successfully merging a pull request may close this issue.
There is no way to set headers on a token when encoding via the command line.
Expected Result
Command line arguments should accept some kind of headers input and pass it to
encode()
.Actual Result
Headers cannot be set.
Reproduction Steps
headers
value will appear in the payload.You can see that no header value is passed to
encode()
here:pyjwt/jwt/__main__.py
Lines 46 to 50 in 6845515
But
encode()
supports header information:pyjwt/jwt/api_jwt.py
Line 45 in 6845515
System Information
The text was updated successfully, but these errors were encountered: