Keats / jsonwebtoken

JWT lib in rust
MIT License
1.69k stars 271 forks source link

Poor Documentation Encoding Key #193

Closed KyleCotton closed 2 years ago

KyleCotton commented 3 years ago

Just want to say this is an amazing crate. Been banging my head against the wall with this for a while now as the docs make no mention that EC keys have to be PKCS8.

I'd love to make a PR with the addition to the docs.

The line here for reference. https://github.com/Keats/jsonwebtoken/blob/2f25cbed0a906e091a278c10eeb6cc1cf30dc24a/src/pem/decoder.rs#L118

Keats commented 3 years ago

Can you make it on the next branch?

KyleCotton commented 3 years ago

Yes will do!

Keats commented 3 years ago

FYI it's in the README (https://github.com/Keats/jsonwebtoken#convert-sec1-private-key-to-pkcs8) but it should be in the code docs as well.