Skip to content

Support Extra Key/Value Pairs in the Header #364

Closed
@paddonizio

Description

@paddonizio

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions