-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
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
Support Extra Key/Value Pairs in the Header #364
Comments
Actually even as I type this, I think that would be a breaking change to add, as it would change |
nonce is actually going to be added in #359 for the header |
That's great news. I'll go ahead and close this then. Thanks again. |
@theadd336 Since that specific PR handling the header hasn't merged yet, may I ask how you got around not having nonce in the header support? If you happen to have a code snippet to run from for generating a token I'd be incredibly grateful. |
Unfortunately, I don't think my answer will be that helpful. I think I just locally cloned this branch and built against my local version of jsonwebtoken directly with this change. Since I was just experimenting and my code wasn't for production, it was the fastest way to get the nonce support I needed. |
Hello,
I was working on using jsonwebtoken to create the JWTs required for Coinbase authentication. Coinbase requires a nonce to be present in the header of the JWT, rather than the body. This seems a bit non-standard, but there is no way with either this library or jwt-simple that I have found to get the nonce into the header, though if I'm wrong, feel free to correct me. My proposal would be to add an additional header field, custom, that serde flattens. This would allow users to specify arbitrary additional metadata to the header that could be serialized.
If this seems reasonable and I'm not missing anything, I'm happy to put up the PR to do this. Just let me know.
Thanks!
The text was updated successfully, but these errors were encountered: