Skip to content

How to use JsonWebToken when I don't have a DER and can't use command line tools #68

@greglearns

Description

@greglearns

I have a rust service that needs to verify JWTs from 3rd-party services that I do not control. The 3rd party service (Portier, in this case) supplies the RSA public components (n modulus, and e exponent). Given that jsonwebtoken can only read DER encoded keys and that I cannot manually run the recommended command-line options for OpenSSL, what is the recommended way of being able to decode a JWT using JsonWebToken in a rust service?

Currently, I have been able to get an ssh public key from the rsa components (n, e) https://github.com/coreos/openssh-keys/blob/master/src/lib.rs#L363 but that seems like a dead end since a public ssh key doesn't seem to be easily converted to DER.

Any ideas?

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