Keats / jsonwebtoken

JWT lib in rust
MIT License
1.64k stars 260 forks source link

Fix invalid field name on OctetKeyParameters #256

Closed jtdavey closed 2 years ago

jtdavey commented 2 years ago

RFC 7518 defines the parameters for symmetric keys to have the 'k' (Key Value) parameter (Section 6.4.1). The OctetKeyParameters structure unfortunately has it defined as "value".

This change should allow parsing of jwks.json files with a symmetric key while keeping the same api.

I've also added a simple test to validate this works as expected.

jtdavey commented 2 years ago

It looks like a maintainer needs to approve running the workflow? I didn't have CLion setup to run rustfmt on save for this one, so missed it.