JWT authorization layer for Axum.
Find a file
kschibli 2bb4b4ca34
fix: Allow non-root OIDC issuer (#5)
My OIDC endpoint is not at the root and I couldn't use `discover_jwks`
because it would strip the path of the issuer.

Before:
```
issuer: 'https://example.com/myissuer/'
result: 'https://example.com/.well-known/openid-configuration'
```

After:
```
issuer: 'https://example.com/myissuer/'
result: 'https://example.com/myissuer/.well-known/openid-configuration'
```

I checked, and having the discovery url not at the root seems to be
supported by the standard:

https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest
2023-03-15 07:26:15 +01:00
.github/workflows build: ci on push.main 2023-03-02 08:14:36 +01:00
config feat: configurable validation (validation: iss, aud, exp, nbf, leeway) (fixes #1) (#4) 2023-02-26 20:30:55 +01:00
demo-server chore: dependencies update 2023-03-02 08:12:06 +01:00
jwt-authorizer fix: Allow non-root OIDC issuer (#5) 2023-03-15 07:26:15 +01:00
.editorconfig refactor: Authorizer::build 2023-02-01 22:09:06 +01:00
.gitignore chore: fmt 2023-01-09 07:37:25 +01:00
Cargo.lock chore: dependencies update 2023-03-02 08:12:06 +01:00
Cargo.toml chore: fmt 2023-01-09 07:37:25 +01:00
CHANGELOG.md chore: release 0.8.0 2023-02-28 07:47:46 +01:00
LICENSE Initial commit 2023-01-08 14:50:54 +01:00
README.md docs: badges 2023-02-27 08:37:36 +01:00
rustfmt.toml chore: fmt 2023-01-28 08:43:51 +01:00

jwt-authorizer

JWT authorizer Layer for Axum.

Build status Crates.io Documentation

Features

  • JWT token verification (Bearer)
    • Algoritms: ECDSA, RSA, EdDSA, HMAC
  • JWKS endpoint support
    • Configurable refresh
    • OpenId Connect Discovery
  • Validation
    • exp, nbf, iss, aud
  • Claims extraction
  • Claims checker
  • Tracing support (error logging)

Usage

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

Development

Minimum supported Rust version is 1.65.

Contributing

Contributions are wellcome!

License

MIT