#jwt #jwk #key-set #jws #verification #signing #validation

jwtk

JWT signing (JWS) and verification, with first class JWK and JWK Set (JWKS) support

8 releases

0.3.0 Aug 21, 2023
0.2.4 Jun 24, 2022
0.2.3 Apr 29, 2022
0.2.2 Jan 26, 2022
0.1.1 Aug 10, 2021

#1139 in Cryptography

Download history 1599/week @ 2024-09-22 1684/week @ 2024-09-29 1564/week @ 2024-10-06 1936/week @ 2024-10-13 1856/week @ 2024-10-20 2119/week @ 2024-10-27 1529/week @ 2024-11-03 1973/week @ 2024-11-10 1775/week @ 2024-11-17 1000/week @ 2024-11-24 1677/week @ 2024-12-01 1513/week @ 2024-12-08 1218/week @ 2024-12-15 339/week @ 2024-12-22 450/week @ 2024-12-29 1361/week @ 2025-01-05

3,400 downloads per month
Used in 2 crates

MIT license

86KB
2.5K SLoC

JWT signing (JWS) and verification, with first class JWK and JWK Set (JWKS) support.

Supports almost all JWS algorithms:

  • HS256, HS384, HS512
  • Ed25519
  • ES256, ES384, ES512, ES256K
  • RS256, RS384, RS512
  • PS256, PS384, PS512

Supports exp and nbf validations. (Other validations will not be supported, because they are mostly application specific and can be easily implemented by applications.)

Supports converting public/private keys to/from PEM/JWK. Supports working with generic keys (where the algorithm is determined at runtime), i.e. SomePrivateKey/SomePublicKey.

Uses good old openssl for crypto.

See the examples folder for some examples.

Dependencies

~3–19MB
~227K SLoC