JWT authorization layer for Axum.
Find a file
2023-01-23 23:36:29 +01:00
config chore: fmt 2023-01-09 07:37:25 +01:00
demo-server refactor: JwtAuthorizer creation simplification 2023-01-23 23:36:29 +01:00
jwt-authorizer refactor: JwtAuthorizer creation simplification 2023-01-23 23:36:29 +01:00
.gitignore chore: fmt 2023-01-09 07:37:25 +01:00
Cargo.lock chore: release 0.4.0 2023-01-21 08:34:54 +01:00
Cargo.toml chore: fmt 2023-01-09 07:37:25 +01:00
CHANGELOG.md refactor: JwtAuthorizer creation simplification 2023-01-23 23:36:29 +01:00
LICENSE Initial commit 2023-01-08 14:50:54 +01:00
README.md docs 2023-01-21 08:34:11 +01:00
rustfmt.toml chore: fmt 2023-01-09 07:37:25 +01:00

jwt-authorizer

JWT authorizer Layer for Axum.

Features

  • JWT token verification (Bearer)
  • Claims extraction
  • JWKS endpoint support (with refresh)
  • Algoritms: ECDSA, RSA, EdDSA, HS
  • Claims checker

Usage

See documentation of the jwt-authorizer module or the demo-server example.

Development

Key generation

EC (ECDSA) - (algorigthm ES256 - ECDSA using SHA-256)

curve name: prime256v1 (secp256r1, secp384r1)

openssl ecparam -genkey -noout -name prime256v1 | openssl pkcs8 -topk8 -nocrypt -out ec-private.pem

openssl ec -in ec-private.pem -pubout -out ec-public-key.pem

EdDSA (Edwards-curve Digital Signature Algorithm)

(Ed25519 - implémentation spécifique de EdDSA, utilisant la Courbe d'Edwards tordue)

openssl genpkey -algorithm ed25519

Contributing

Contributions are wellcome!

License

MIT